当我在 Jenkins 中构建时,它失败并出现此错误。有什么想法吗?
ERROR: Error cloning remote repo 'origin' : Could not clone git@github.com:test/test.git
ERROR: Cause: Error performing command: git clone --progress -o origin
git@github.com:test/test.git /var/lib/jenkins/jobs/test/workspace
Command "git clone --progress -o origin git@github.com:test/test.git
/var/lib/jenkins/jobs/test/workspace" returned status code 128: Initialized empty Git
repository in /var/lib/jenkins/jobs/test/workspace/.git/
No protocol specified
(ssh-askpass:801): Gtk-WARNING **: cannot open display: :0.0
Host key verification failed.
fatal: The remote end hung up unexpectedly
最佳答案
您需要将您的私有(private) ssh key 复制到 Jenkins 下的 .ssh
文件夹中。类似于(在 Ubuntu Lucid 上):
/var/lib/jenkins/.ssh
关于github - Jenkins 失败并显示 github "git clone",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103684/