当我在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
最佳答案
您需要将ssh私钥复制到Jenkins下的.ssh
文件夹中。诸如此类(在Ubuntu Lucid上):/var/lib/jenkins/.ssh
关于github - Jenkins因github “git clone”而失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6103684/