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

I'm trying to start a Jenkins build from the command line on OS X.

Our server has authentication turned on so I have to authenticate from the command line call.

I've registered my ssh key with the jenkins server but I'm still required to enter the key's passphrase manually.

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 this prompt:

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

Why is the passphrase required when I'm using a private key and how do I overcome this?


This is happening because Jenkins is trying to use the ssh authentication method by default and is not smart enough to use your ssh agent, or to figure out that if you specify the user/password this does not makes sense.

If you want you can disable this behaviour by adding -noKeyAuth parameter.

链接地址: http://www.djcxy.com/p/30168.html

上一篇: 工作室:“Gradle正在运行。继续执行Project closing?”

下一篇: 为什么Jenkins在通过密钥后仍然要求输入ssh密码?