I’m looking for a proper way to git clone using ssh proxy in Jenkins for freestyle job.
The problem is that the ssh key chosen on Source Code Management step is not used by build node when authentication on proxy host. Instead, it looks for local keys on the node.
stderr: firstname.lastname@example.org: Permission denied (publickey). kex_exchange_identification: Connection closed by remote host
.ssh/config on the build node
Host git.example.com ProxyJump ssh-proxy.example.com Host ssh-proxy.example.com User user123
If I manually put the key on the node, it works. However this is not Jenkins way. Can anyone advice better approach to this?