I'm trying to enable ForwardAgent in the "Publish over SSH" Jenkins Plugin. This would allow jenkins to execute deployments, rsyncs and svn+ssh checkouts on remote servers. But there's no option for this in the GUI.

ForwardAgent is set to yes in /etc/ssh/ssh_config and in /var/lib/jenkins/.ssh/config, but when Jenkins jobs login over ssh, the remote session does not have the key loaded in agent. ("Could not open a connection to your authentication agent.")

Is there a way to force ForwardAgent, or a better way to do this (via a Jenkins slave)?

Thanks for any ideas, much appreciated!

link|improve this question
"Could not open a connection to your authentication agent." means a failure to communicate to the agent. Please provide output of following commands when executed remotely: ssh-add -l; echo $SSH_AUTH_SOCK; ls -ld $SSH_AUTH_SOCK – yarek Feb 7 at 21:47
@yarek, it looks like it's not finding $SSH_AUTH_SOCK: ` SSH: EXEC: STDOUT/STDERR from command [ssh-add -l; echo SSH_AUTH_SOCK is "$SSH_AUTH_SOCK"; ls -ld $SSH_AUTH_SOCK] ... Could not open a connection to your authentication agent. SSH_AUTH_SOCK is drwxr-xr-x 9 user user 4096 2012-02-06 18:43 . ` – r_2 Feb 7 at 22:41
I probably need to start agent and set that env var on jenkins startup. Let me try that... – r_2 Feb 7 at 22:47
do you have the agent started on your local machine? The commands above should tell. – yarek Feb 8 at 12:34
When do you enter the password for the agent to load the key? Is that a different user than the one jenkins runs on? – AndreasM Feb 10 at 12:00
show 1 more comment
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.