美文网首页
jenkins git clone异常

jenkins git clone异常

作者: zhengxiaolang | 来源:发表于2019-07-24 11:42 被阅读0次

背景:

以前都是公司配置好jenkins环境,再自己构建项目。
最近自己搭建时候发现一个问题:

报错:

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command "git fetch --tags --force --progress [http://192.168.11.200/xxx.git](http://192.168.11.200/xxx.git) +refs/heads/*:refs/remotes/origin/*" returned status code 143:
stdout: 
stderr: 
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:655)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1152)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
    at hudson.scm.SCM.checkout(SCM.java:504)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    at hudson.model.Run.execute(Run.java:1816)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE</pre>

原因:

jenkins git路径配置错误

解决:

打开jenkins配置git路径,可以选择以下2种方法任意一种:
1、打开网址 http://localhost:8080/configureTools/
2、 系统管理--》全局工具配置

找到git 配置路径。
查看当前系统git路径:
使用命令:which git
得到:/usr/local/bin/git
将路径粘贴到
Path to Git executable 输入框内
保存,再去相应项目执行构建任务。

相关文章

  • jenkins git clone异常

    背景: 以前都是公司配置好jenkins环境,再自己构建项目。最近自己搭建时候发现一个问题: 报错: 原因: je...

  • Jenkins Git clone加速

    Jenkins 上的 Git Plugin插件,默认是下载完整的历史版本,随着分支约多,历史版本约多,整个文件会很...

  • Jenkins git clone失败 : Killed by

    Jenkins version:2.121.2 Jenkins任务,clone代码时,出现任务被kill掉的情况,...

  • 解决 Could not read from remote re

    最近我在运行 Jenkins Job 时候突然发现 git clone 代码的时候突然报了这个错误: 这个错误只在...

  • Git Bash使用随记

    clone 代码 git clone git@xxxxxx默认master分支 clone 指定分支代码 git ...

  • 9、持续集成

    持续集成步骤 1、上传代码至远程仓库(本地做的) 模拟jenkins操作 1、下载代码至本地 git clone ...

  • git基础操作

    基本: 从master分支clone git clone地址 从指定分支clone git clone -b 远程...

  • Jenkins master :: git clone 报错无法

    git clone 报错无法ini hudson.plugins.git.GitException: Error ...

  • Git常用命令(二)

    1、git clone 功能:克隆git仓。 格式:git clone url 用法: clone完成后,已经存在...

  • Git常用命令

    git clonegit clone git clone ssh://git@xxx.xxx.git克隆远程到本地...

网友评论

      本文标题:jenkins git clone异常

      本文链接:https://www.haomeiwen.com/subject/keatrctx.html