jenkins git clone失败

    Jenkins任务,clone代码,出现以下错误。clone任务被kill掉了,因此造成代码clone不成功。所以后续的任务,也没有被执行。

 

Killed
by signal 15.

  at  
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImlp.java:1799)

  at  
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1525)

  …..

ERROR:
null

Warning:
you have no plugins providing access control for builds, so falling back to  
legacy behavior of permitting any downstream builds to be
triggered.

     查看clone任务执行的打印结果,在打印信息的最开始处有如下信息。通过该信息,可以看出,是因为clone超时了,默认是10分钟,如果10分钟,代码都没有clone下来,那么就会clone失败。

 

ERROR:
Timeout after 10 minutes

ERROR:
Error cloning remote repo ‘origin’

Hudson.plugins.git.GitException:
Command “git fetch –tags –progress ….  + refs/remotes/origin/*” return status code
143:

stdout:

stderr:
remote: Counting objects: 19223

     当所需要clone的版本库过大后,clone的时间会超过默认的10分钟。因此需要修改这clone的超时时间。

     在任务的git配置界面,选择add。会弹出很多配置项。

clip_image002[3]

     分别选择 Advanced checkout
behaviours, Advanced clone behaviours.

clip_image004[3]

     timeout的输入框中,输入超时时间。

clip_image006[3]

     设置完超时时间,即可解决问题。

此条目发表在持续集成分类目录,贴了, 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。