Thursday, July 30, 2020

Jenkins ssh-agent plug in



Jenkins ssh-agent only takes user and private key as credentials for build jobs, not user and password, otherwise you will get error below:

FATAL: [ssh-agent] Could not find specified credentials
[ssh-agent] Looking for ssh-agent implementation... 
[ssh-agent] Exec ssh-agent (binary ssh-agent on a remote machine)
.....
Permission denied, please try again. 
Permission denied (publickey,password).

Target remote server must have completed setting for ssh login via private key before. (public key in ~/.ssh/authorized_keys)