I'm trying to use the Jenkins Amazon EC2 plugin to start and use AWS EC2 instances for slaves. Jenkins will start the slave, and the slave connects to the master, but my builds are not able to connect to our Git repositories over SSH. The slave is running on the Amazon Linux AMI.
I created a Global credential in a domain bound to the ssh URI scheme and entered the key directly. The name of the credential is "Git SSH". I see GIT_SSH in the logs, which I take to be a translation of the name I specified. So far, I have verified that if I log into the machine directly and add the credentials manually it will clone the repository. Also, I modified a different job which runs on a non-EC2 slave to use the same credential and it clones the repository using those credentials. Does anybody have any suggestions on how I might get my slave to connect to my Git repository? Cloning the remote Git repository Cloning repository ssh://host/repo.git git --version git version 1.8.3.1 using GIT_SSH to set credentials Builder ERROR: Error cloning remote repo 'origin'hudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>: Could not clone ssh://host/repo.git at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:310) <http://stacktrace.jenkins-ci.org/search/?query=org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute&entity=method> at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:151) <http://stacktrace.jenkins-ci.org/search/?query=org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call&entity=method> at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:144) <http://stacktrace.jenkins-ci.org/search/?query=org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call&entity=method> at hudson.remoting.UserRequest.perform(UserRequest.java:118) <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.UserRequest.perform&entity=method> at hudson.remoting.UserRequest.perform(UserRequest.java:48) <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.UserRequest.perform&entity=method> at hudson.remoting.Request$2.run(Request.java:326) <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.Request$2.run&entity=method> at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) <http://stacktrace.jenkins-ci.org/search/?query=hudson.remoting.InterceptingExecutorService$1.call&entity=method> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) <http://stacktrace.jenkins-ci.org/search/?query=java.util.concurrent.FutureTask$Sync.innerRun&entity=method> at java.util.concurrent.FutureTask.run(FutureTask.java:166) <http://stacktrace.jenkins-ci.org/search/?query=java.util.concurrent.FutureTask.run&entity=method> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) <http://stacktrace.jenkins-ci.org/search/?query=java.util.concurrent.ThreadPoolExecutor.runWorker&entity=method> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) <http://stacktrace.jenkins-ci.org/search/?query=java.util.concurrent.ThreadPoolExecutor$Worker.run&entity=method> at java.lang.Thread.run(Thread.java:679) <http://stacktrace.jenkins-ci.org/search/?query=java.lang.Thread.run&entity=method> Caused by: hudson.plugins.git.GitException <http://stacktrace.jenkins-ci.org/search?query=hudson.plugins.git.GitException>: Command "clone --progress -o origin ssh://host/repo.git /var/jenkins/workspace/TestProjectForEC2Slave" returned status code 128: stdout: Cloning into '/var/jenkins/workspace/TestProjectForEC2Slave'... Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:64) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:308) ... 11 more ERROR: nullFinished <http://stacktrace.jenkins-ci.org/search?query=Finished>: FAILURE Here is some version information: Jenkins 1.537 Amazon EC2 Plugin 1.19 Jenkins GIT plugin 2.0 Jenkins GIT client plugin 1.4.6 Open JDK Runtime on master 1.6.0_24-b24 Open JDK Runtime on slave 1.6.0_24-b24 -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.