我通过从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.
但是凭据位于詹金斯凭据下。 .ssh文件夹也被复制。关于可能出了什么问题的任何建议吗?
答案 0 :(得分:0)
我遇到了同样的错误,我的情况是:
I copies id_rsa.pub public key to jenkins credentials, but id_rsa.pub public key is for gitub\gitlab... while id_rsa this private key is for jenkins credentials
我将这个私钥id_rsa复制到jenkins凭证后,一切正常!