詹金斯CLI认证 [英] Jenkins CLI Authentication

查看:213
本文介绍了詹金斯CLI认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从CLI我詹金斯运行groovysh,使用下面的命令:

I am trying to run groovysh on my Jenkins from the cli, using the following command:

java -jar jenkins-cli.jar -s <Jenkins URL> -i JenkinsPrivateKey.ppk groovysh

我生成使用的puttygen这个私钥文件,并粘贴公钥到SHH公共密钥框中詹金斯的/我/配置页面。这并不是说该键不起作用 - 好像这不是验证的。当我运行谁-AM-使用CLI:

I generated this private key file using PuttyGen, and pasted the public key into the SHH Public Keys box on the /me/configure page of the Jenkins. It's not that the key doesn't work - it seems like it's not authenticating at all. When I run who-am-i using the cli:

java -jar jenkins-cli.jar -s <Jenkins URL> -i JenkinsPrivateKey.ppk who-am-i

这给我的回应:

Authenticated as: anonymous

我缺少的是在这里吗?我想,如果验证失败,将至少显示某种类型的错误消息。有什么办法来验证私钥的实际工作?

What am I missing here? I thought if the authentication failed it would at least display an error message of some kind. Is there any way to verify that the private key actually works?

编辑:一些试验后,似乎通过CLI验证并静默失败 - 我把一个假公钥我的个人资料的配置,我仍然没有看到错误

After some experimentation, it seems that authentication via the CLI does fail silently - I put a bogus public key in my profile configuration, and I still saw no error.

推荐答案

您可能需要您的腻子键转换为OpenSSH格式为他们的关键正常工作。

You may need to convert your putty keys to openssh format for them to work properly with the key.

请参阅的https://wiki.cloudbees.com/bin/view/DEV/Customer%2BProvided%2BSlaves%2BWindows

回用腻子转换密钥生成器,>导出OpenSSH密钥保存私钥文件。

"Back to Putty Key Generator, use Conversions > Export OpenSSH key to save the private key to a file."

如果这样的作品,随意编辑詹金斯CLI维基页面

If that works, feel free to edit the Jenkins CLI wiki page!

这篇关于詹金斯CLI认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆