{"action":"created","issue":{"url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/49","labels_url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/49/comments","events_url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/49/events","html_url":"https://github.com/ashwanthkumar/gocd-build-github-pull-requests/issues/49","id":103372096,"number":49,"title":"Unable to configure for private repository","user":{"login":"jeisen","id":408427,"avatar_url":"https://avatars.githubusercontent.com/u/408427?v=3","gravatar_id":"","url":"https://api.github.com/users/jeisen","html_url":"https://github.com/jeisen","followers_url":"https://api.github.com/users/jeisen/followers","following_url":"https://api.github.com/users/jeisen/following{/other_user}","gists_url":"https://api.github.com/users/jeisen/gists{/gist_id}","starred_url":"https://api.github.com/users/jeisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeisen/subscriptions","organizations_url":"https://api.github.com/users/jeisen/orgs","repos_url":"https://api.github.com/users/jeisen/repos","events_url":"https://api.github.com/users/jeisen/events{/privacy}","received_events_url":"https://api.github.com/users/jeisen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-26T21:52:45Z","updated_at":"2015-09-03T22:19:22Z","closed_at":null,"body":"I'm attempting to create PR pipelines for private GitHub repositories. I already have them all set up using the standard Git material configuration, using the SSH endpoints and with the private key stored in ~/.ssh.\r\n\r\nI've set up a pipeline using the PR plugin, and have tried using both the http and ssh endpoints, and using a ~/.github with both standard user/password auth and OAuth. All combinations give the same error from the server:\r\n\r\n```\r\nModification check failed for material: [url=git@github:<my_repo>.git] [Aug-24 19:15:06]\r\nInteraction with plugin with id 'github.pr' implementing 'scm' extension failed while requesting for 'latest-revision'. Reason: [Unsuccessful response from plugin. Plugin returned with code '500' and the following response: '\"clone failed\"']\r\n```\r\n\r\nThe stacktrace shows this:\r\n\r\n```\r\n2015-08-24 19:10:36,910  INFO [84@MessageListener for MaterialUpdateListener] GitHubPRBuildPlugin:52 - Flyweight: /var/lib/go-server/pipelines/flyweight/6e32a058-b36b-4344-969a-ca90b204caa2\r\n2015-08-24 19:10:36,959  WARN [84@MessageListener for MaterialUpdateListener] GitHubPRBuildPlugin:67 - get latest revision: \r\njava.lang.RuntimeException: clone failed\r\nat com.tw.go.plugin.jgit.JGitHelper.cloneRepository(JGitHelper.java:67)\r\nat com.tw.go.plugin.GitHelper.cloneOrFetch(GitHelper.java:38)\r\nat in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handleGetLatestRevision(GitHubPRBuildPlugin.java:161)\r\nat in.ashwanthkumar.gocd.github.GitHubPRBuildPlugin.handle(GitHubPRBuildPlugin.java:86)\r\nat com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:172)\r\nat com.thoughtworks.go.plugin.infra.DefaultPluginManager$1.execute(DefaultPluginManager.java:167)\r\nat com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:315)\r\nat com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:245)\r\nat com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:167)\r\nat com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:32)\r\nat com.thoughtworks.go.plugin.access.scm.SCMExtension.getLatestRevision(SCMExtension.java:137)\r\nat com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.latestModification(PluggableSCMMaterialPoller.java:61)\r\nat com.thoughtworks.go.server.service.materials.PluggableSCMMaterialPoller.latestModification(PluggableSCMMaterialPoller.java:46)\r\nat com.thoughtworks.go.server.service.MaterialService.latestModification(MaterialService.java:106)\r\nat com.thoughtworks.go.server.materials.LegacyMaterialChecker.findLatestModification(LegacyMaterialChecker.java:49)\r\nat com.thoughtworks.go.server.materials.ScmMaterialUpdater.insertLatestOrNewModifications(ScmMaterialUpdater.java:52)\r\nat com.thoughtworks.go.server.materials.ScmMaterialUpdater.addNewMaterialWithModifications(ScmMaterialUpdater.java:72)\r\nat com.thoughtworks.go.server.materials.PluggableSCMMaterialUpdater.addNewMaterialWithModifications(PluggableSCMMaterialUpdater.java:66)\r\nat com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.addNewMaterialWithModifications(MaterialDatabaseUpdater.java:178)\r\nat com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.initializeMaterialWithLatestRevision(MaterialDatabaseUpdater.java:134)\r\nat com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.access$000(MaterialDatabaseUpdater. java:47)\r\nat com.thoughtworks.go.server.materials.MaterialDatabaseUpdater$1.doInTransaction(MaterialDatabaseUpdater.java:95)\r\nat com.thoughtworks.go.server.transaction.TransactionCallback.doWithExceptionHandling(TransactionCallback.java:24)\r\nat com.thoughtworks.go.server.transaction.TransactionTemplate$3.doInTransaction(TransactionTemplate.java:53)\r\nat org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)\r\nat com.thoughtworks.go.server.transaction.TransactionTemplate.executeWithExceptionHandling(TransactionTemplate.java:49)\r\nat com.thoughtworks.go.server.materials.MaterialDatabaseUpdater.updateMaterial(MaterialDatabaseUpdater.java:92)\r\nat com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:48)\r\nat com.thoughtworks.go.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:29)\r\nat com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:65)\r\nat com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:50)\r\nat java.lang.Thread.run(Thread.java:745)\r\nCaused by: org.eclipse.jgit.api.errors.TransportException: git@github.<my_repo>.git: Auth fail\r\nat org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)\r\nat org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:193)\r\nat org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:133)\r\nat com.tw.go.plugin.jgit.JGitHelper.cloneRepository(JGitHelper.java:65)\r\n... 31 more\r\nCaused by: org.eclipse.jgit.errors.TransportException: g...@github.com:<my_repo>.git: Auth fail\r\nat org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:159)\r\nat org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:136)\r\nat org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:262)\r\nat org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:161)\r\nat org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)\r\nat org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)\r\nat org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)\r\nat org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)\r\n... 34 more\r\nCaused by: com.jcraft.jsch.JSchException: Auth fail\r\nat com.jcraft.jsch.Session.connect(Session.java:512)\r\nat org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)\r\n... 41 more\r\n```\r\n\r\nThis only seems to be happening with private repositories. If I try a public one, it moves forward properly. I've verified that the login credentials are correct and have access to the repos."},"comment":{"url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/comments/137589415","html_url":"https://github.com/ashwanthkumar/gocd-build-github-pull-requests/issues/49#issuecomment-137589415","issue_url":"https://api.github.com/repos/ashwanthkumar/gocd-build-github-pull-requests/issues/49","id":137589415,"user":{"login":"jeisen","id":408427,"avatar_url":"https://avatars.githubusercontent.com/u/408427?v=3","gravatar_id":"","url":"https://api.github.com/users/jeisen","html_url":"https://github.com/jeisen","followers_url":"https://api.github.com/users/jeisen/followers","following_url":"https://api.github.com/users/jeisen/following{/other_user}","gists_url":"https://api.github.com/users/jeisen/gists{/gist_id}","starred_url":"https://api.github.com/users/jeisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeisen/subscriptions","organizations_url":"https://api.github.com/users/jeisen/orgs","repos_url":"https://api.github.com/users/jeisen/repos","events_url":"https://api.github.com/users/jeisen/events{/privacy}","received_events_url":"https://api.github.com/users/jeisen/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T22:19:22Z","updated_at":"2015-09-03T22:19:22Z","body":"Check Connection gives \"Could connect to URL successfully\"\r\n\r\nWe do have git in the global path. I have go-server running inside a Docker container that runs '/usr/share/go-server/server.sh' in a shell, which should not have any issue seeing git in the path."}}