Why is Jenkins still asking for the ssh password after passing the key?

I am trying to start the Jenkins build from the command line on OS X.

Our server has enabled authentication, so I need to authenticate from a command line call.

I registered my ssh key with the jenkins server, but I still need to enter the passphrase.

Here is the command I'm using:

$ java -jar jenkins-cli.jar -s http://localhost:8080/ -i ~/.ssh/id_rsa build 'MyApp' 

After entering the command, I get the following prompt:

 Enter passphrase for /Users/jenkins/.ssh/id_rsa: 

Why is a passphrase required when I use a private key and how do I overcome this?

+5
source share
1 answer

This is because Jenkins is trying to use the default ssh verification method and is not smart enough to use your ssh agent, or figuring out that if you provide a user / password, it makes no sense.

If you want, you can disable this behavior by adding the -noKeyAuth parameter.

+2
source

Source: https://habr.com/ru/post/1234740/


All Articles