当我在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
Run Code Online (Sandbox Code Playgroud)
Hed*_*hog 23
您需要将私有ssh密钥复制到.ssh
Jenkins下面的文件夹中.像(在Ubuntu Lucid上):
/var/lib/jenkins/.ssh
man*_*lds 15
主机密钥验证失败. - 确保您的SSH密钥设置正确.
http://help.github.com/linux-set-up-git/
完成后,
ssh git@github.com
Run Code Online (Sandbox Code Playgroud)
应该从GitHub给你一个欢迎消息(也说没有shell访问)
有同样的问题,即使正确设置了ssh-key.
问题是在第一次连接尝试时,需要将git-server添加到已知的hosts文件中
/.ssh/known_hosts
.首次连接尝试时Git会提示您:您确定要继续连接(是/否)?,但詹金斯没有也不能传递提示,所以它默默地失败了.
我们解决了它步行到我们的OPS-家伙,把他的咖啡一杯好,并且让他做一个随机的git结帐,他回答是与所述提示:)之后,通过詹金斯检出预期一样.
在这里找到线索:http://www.ipsure.com/blog/2010/ssh-public-key-w-rsa-authentication-and-ssh-tunneling-part-1/
归档时间: |
|
查看次数: |
52224 次 |
最近记录: |