【发布时间】:2019-12-27 11:11:04
【问题描述】:
我通过从 JENKINS_HOME 目录复制文件来进行 jenkins 配置备份。我使用全新的 Jenkins 安装将它们复制到另一台机器上的 Jenkins 主目录。当我打开需要从 git 存储库下载文件的作业之一时,我得到了
Failed to connect to repository : Command "C:\Program Files\Git\cmd\git.exe ls-remote -h git@git.path.com:project/main.git HEAD" returned status code 128:
stdout:
stderr: Load key "C:\\WINDOWS\\TEMP\\ssh1234567.key": invalid format
Permission denied, please try again.
Permission denied, please try again.
git@git.path.com: Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
但凭据存在于 Jenkins 凭据下。 .ssh 文件夹也被复制。关于可能出了什么问题的任何建议?
【问题讨论】:
-
我不确定 ssh 密钥是否实际存储在 Jenkins 家中。它们可能是 not (Jenkins 自己管理它并通过 ssh 代理协议将其提供给 Git 的 openssh),因为私钥应该永远不会离开主机。您可以简单地生成一个新密钥并进行设置吗?