gpt4 book ai didi

git - 为 Gerrit 和 Hudson 创建 SSH key

转载 作者:太空狗 更新时间:2023-10-29 12:52:22 26 4
gpt4 key购买 nike

我正在尝试使用 Hudson Gerrit Trigger插件。

无论出于何种原因,Gerrit 不接受位于 /var/lib/hudson/.ssh/id_rsaSSH key 。

在 GUI 中 我得到 Connection error : com.jcraft.jsch.JSchException: Auth fail 作为错误,当我在 终端 我收到一个Permission denied (publickey) 错误。

我如何生成和使用有效的私钥,以便 HudsonGerrit 可以很好地发挥作用?

最佳答案

OP Josh Smith设法解决了这个问题:

I'd actually needed to add the SSH key from /var/lib/hudson/.ssh/id_rsa.pub for the user (me) into the Gerrit GUI.
Then from there it worked like a charm.
The username must be the username in Gerrit (the admin account).

我的原始建议如下:


哪些用户会使用基于网络的代码审查系统 Gerrit?

该用户在其 $HOME/.ssh/authorized_keys 中需要您的 /var/lib/hudson/.ssh/id_rsa.pub 公共(public) ssh key ,如中所示this guide .

alt text

key 分发

The public portion of the RSA key pair must be copied to any servers that will be accessed by the client. The public key information to be copied should be located in the ~/.ssh/id_rsa.pub file on the client.
Assuming that all of the servers use OpenSSH instead of a different SSH implementation, the public key data must be appended into the ~/.ssh/authorized_keys file on the servers.

# first, upload public key from client to server
client$ scp ~/.ssh/id_rsa.pub server.example.org:

# next, setup the public key on server
server$ mkdir ~/.ssh
server$ chmod 700 ~/.ssh
server$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
server$ chmod 600 ~/.ssh/authorized_keys
server$ rm ~/id_rsa.pub

Be sure to append new public key data to the authorized_keys file, as multiple public keys may be in use. Each public key entry must be on a different line.


关于git - 为 Gerrit 和 Hudson 创建 SSH key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3712443/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com