【发布时间】:2021-05-06 15:03:16
【问题描述】:
我在我的 Ubuntu 20.04 服务器上使用用户 Jenkins 生成了一个公共 SSH 密钥,我的密钥存储在下面:
/var/lib/jenkins/.ssh/id_rsa.pub
我已经在我的 Gitlab SSH 参数上设置了该公钥,并且我还在 Jenkins 中为 SSH 私钥创建了一个凭据,我在其中粘贴了我在 linux 20.04 远程服务器中为我的 Jenkins 用户生成的私钥。 当我尝试使用 SSH 克隆项目时,出现错误:
无法连接到存储库:执行 git 命令时出错:/usr/lib/git-core ls-remote -h git@gitlab.com:project/repository.git HEAD*
需要帮助来解决这个问题。 enter image description here
【问题讨论】: