Jenkins 因 github“git clone"失败 [英] Jenkins fails with github "git clone"

查看:56
本文介绍了Jenkins 因 github“git clone"失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Jenkins 中构建时,它因此错误而失败.有什么想法吗?

When I do build in Jenkins, it fails with this error. Any idea?

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

You need to copy your private ssh key into the .ssh folder beneath Jenkins. Something like (on Ubuntu Lucid): /var/lib/jenkins/.ssh

这篇关于Jenkins 因 github“git clone"失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆