Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have:

  1. MASTER: A master running jenkins under Ubuntu;
  2. SLAVE: A slave running Mac OSX;
  3. GIT REPO: A remote GIT repo.

I am having a hard time to get jenkins run git commands onto GIT REPO from MASTER through SLAVE. Basically, builds fail with the following error:

Fetching upstream changes from origin
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Command "/usr/local/git/bin/git fetch -t origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

"Manually", here are the steps I follow starting on MASTER (I removed non-significant commands):

 1. $ sudo su jenkins
 2. $ ssh-add -L
Could not open a connection to your authentication agent.
 3. $ eval $(ssh-agent)
 4. $ ssh-add -L
The agent has no identities.
 5. $ ssh-add .ssh/id_rsa
Identity added: .ssh/id_rsa (.ssh/id_rsa)
 6. $ ssh jenkins@<host> <= I added agent forwarding in ~.ssh/conf file
 7. $ cd Documents/TEMP/
 8. $ /usr/local/git/bin/git fetch -t origin +refs/heads/*:refs/remotes/origin/*

Questions:

  1. How do I automatically add current identity to jenkins (without having to eval() + ssh-add ?
  2. Am I at least on the right track?
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.