jenkin git clone错误

时间:2015-04-16 13:48:39

标签: git github jenkins

无法在jenkins中克隆git repo。得到以下错误(同样的工作工作正常,git仓库没有变化)

Cloning repository origin
Error trying to determine the git version: Error performing command:  --version
null
Assuming 1.6
ERROR: Error cloning remote repo 'origin' : Could not clone git@github.xxx.git
hudson.plugins.git.GitException: Could not clone git@github.xxx.git
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:245)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1073)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1014)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1014)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
    at hudson.model.Run.execute(Run.java:1567)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:237)
Caused by: hudson.plugins.git.GitException: Error performing command:  clone -o origin git@github.xxx.git /var/lib/jenkins/jobs/xxx/yyy
null
    at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:776)
    at hudson.plugins.git.GitAPI.access$000(GitAPI.java:38)
    at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:241)
    at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:221)
    at hudson.FilePath.act(FilePath.java:865)
    at hudson.FilePath.act(FilePath.java:838)
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:221)
    ... 13 more

2 个答案:

答案 0 :(得分:0)

您必须安装jenkins git plugin

答案 1 :(得分:0)

检查以下内容

  1. 检查您是否已安装Git插件。
  2. 检查您是否已将Jenkin配置为使用本地git(由于您的命令不是以Git命令开头,因此,请在Jenkin中设置Git路径)。
  3. 检查天气Git已配置为绕过SSL配置,请参阅“ Jenkins Git integration - How to disable SSL certificate validation