Jenkins unable to get ssh-agent to work, looks for a missing askpass_*.sh file

Jenkinsjenkins-multibranch

I installed the ssh-agent before and had everything working nicely with an ssh key that has all the proper permissions for cloning repos from a github project, but now after setting up another instance of Jenkins (as closely as I could, I didn't clone it when I should have), I get the following error:

$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-4CemQOSbNiXl/agent.4477
SSH_AGENT_PID=4479

Running ssh-add (command line suppressed)

ssh_askpass:
exec(/home/ubuntu/.jenkins-slave/workspace/ippy_feature_jenkins-builds-FOF44763DY7BL4HHQ5XQK5MYECXWHFCEFWC4PHU6FWHKBZV6RNSA@tmp/askpass_5871550252464921079.sh):
No such file or directory

This is being used with the
sshagent (credentials: ['correct-key-here'])
in the Jenkinsfile in the repo.

Thanks for any info

Best Answer

Stupid error message for a stupid mistake. In the credentials, the public ssh key was used instead of the private ssh key.

Related Topic