使用 git ssh 密钥配置 jenkins 时出现错误

问题描述 投票:0回答:1

我正在使用我的詹金斯作为本地主机我在github中添加了我的公钥并尝试在机器中克隆

git clone [email protected]:xyz/xyz.git
它完美地克隆了 repo commit repo 和 pull push 在本地机器上完全工作。 我想使用 jenkins 通过 jenkins 和 ssh 来构建我的工作我将我的私钥添加到用户名中的管理凭证中,使用 ssh 密钥,就像这样

并尝试添加新的管道作业

但我收到错误消息

Failed to connect to repository : Command "git ls-remote -h -- [email protected]:neetesshhr/sheildxwebpage.git HEAD" returned status code 128:
stdout:
stderr: No ED25519 host key is known for github.com and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我试着关注这个link

但是根本不起作用如何解决这个问题?

git github jenkins ssh
1个回答
0
投票

实际的错误信息是“

Host key verification failed
”,这意味着你需要将远程服务器主机密钥指纹添加到Jenkins

如果是 GitHub,你会在

githubs-ssh-key-fingerprints
找到所说的指纹,正如我在这里提到的

© www.soinside.com 2019 - 2024. All rights reserved.