- MASTER: A master running jenkins under Ubuntu;
- SLAVE: A slave running Mac OSX;
- 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/*
- How do I automatically add current identity to jenkins (without having to eval() + ssh-add ?
- Am I at least on the right track?