--昨夜西风凋碧树,独上高楼,望尽天涯路

Jenkins + GitLab持续集成时遇到如下错误:

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /root/.jenkins/workspace/eureka-serviceat org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:787)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:579)at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)at hudson.security.ACL.impersonate(ACL.java:290)at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)at java.util.concurrent.FutureTask.run(FutureTask.java:266)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: hudson.plugins.git.GitException: Error performing command: git init /root/.jenkins/workspace/eureka-serviceat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2023)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1980)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1612)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:785)... 14 more
Caused by: java.io.IOException: Cannot run program "git" (in directory "/root/.jenkins/workspace/eureka-service"): error=2, 没有那个文件或目录at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)at hudson.Proc$LocalProc.<init>(Proc.java:249)at hudson.Proc$LocalProc.<init>(Proc.java:218)at hudson.Launcher$LocalLauncher.launch(Launcher.java:935)at hudson.Launcher$ProcStarter.start(Launcher.java:454)at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2012)... 18 more
Caused by: java.io.IOException: error=2, 没有那个文件或目录at java.lang.UNIXProcess.forkAndExec(Native Method)at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)at java.lang.ProcessImpl.start(ProcessImpl.java:134)at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)... 23 more

解决方案:

再Jenkins所在的主机上执行如下命令安装git:

yum install git

测试:

Jenkins构建时报错 GitERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException相关推荐

  1. jenkins windows slave 报错ERROR: Error cloning remote repo 'origin'

    在slave上是git clone ssh是可以成功的,但是jenkins调用slave节点就报如下错误: ERROR: Error cloning remote repo 'origin' huds ...

  2. jenkins报错hudson.plugins.git.GitException: Could not init /root/.jenkins/workspace/DeployOrder/order

    运行Jenkins部署任务 gblfy 2019-05-21 14:08:51  1881  收藏 分类专栏: Jenkins 版权 一.运行Jenkins部署任务 1. 执行Jenkins部署任务 ...

  3. window中搭建jenkins_Windows环境中的jenkins构建时报错

    按照第三章的讲解进行安装配置后,最后尝试连接进行验证时,可以走通.但是到第五章实际实现自动化部署任务时,按照课程的讲解配置完后,构建时报错:Started by user adminRunning a ...

  4. jenkins构建:ERROR: Error fetching remote repo ‘origin‘(hudson.plugins.git.GitException/does not point)

    [EnvInject] - Loading node environment variables. 构建中 在工作空间 /Users/jenkins/workspace/XXX 中> git r ...

  5. jenkins构建时git报错:hudson.plugins.git.GitException: Failed to fetch from

    问题: jenkins拉取远程代码构建git报错:hudson.plugins.git.GitException: Failed to fetch from 拉不到远程分支 提示信息如下 ERROR: ...

  6. jenkins git can't work ERROR: Timeout after 10 minutes ERROR: Error fetching remote repo 'origin'

    jenkins之前一直好好的.但是忽然就不能用了 .我就清理了工作空间.然后悲剧的发现.从服务器上代码都拉不下来了.显示是超时了.但是其他的jenkins任务都好好的.在网上查了很多的方法.但是都不起 ...

  7. ERROR: Timeout after 10 minutes ERROR: Error fetching remote repo 'origin'

    错误日志 ERROR: Timeout after 10 minutes ERROR: Error fetching remote repo 'origin' hudson.plugins.git.G ...

  8. Jenkins报错Error fetching remote repo 'origin'真正解决办法

    Jenkins build时报错Error fetching remote repo 'origin',网上大部分文章都说是git权限问题,其实并不是,造成这个问题的原因是Jenkins有个工作空间( ...

  9. 问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...

    jenkins构建时报错:The goal you specified requires a project to execute but there is no POM in this direct ...

最新文章

  1. 【ubuntu】vim中鼠标选中时变成 可视模式,不能复制的解决方法
  2. CSS 实现打字效果
  3. 油价新年首涨:“五连跌”终结 一箱油多花4元
  4. 【来龙去脉系列】.net分布式系统架构的思路
  5. mysql_fetch_bit_mysql_fetch_array()
  6. 删除华为电视鸿蒙系统,华为解决互联网电视痛点:鸿蒙系统首发设备欲屏蔽开机广告...
  7. win10 系统下获取系统版本号为6.2的问题
  8. 智能汽车软件关键技术及应用趋势
  9. 蓝桥杯 PREV-10 幸运数
  10. 2022 Google 谷歌开发者大会亮点抢先看
  11. mp3lame linux 编译,linux下lame编程:wav转MP3示例代码
  12. Jest测试框架入门之快照测试(附踩坑指南)
  13. 随机生成姓名存入mysql_MYSQL随机生成姓名
  14. 【海外合作】效率源智能手机取证系统入选克罗地亚大学教学工具
  15. BIGEMAP下载等高线(高程)使用教程
  16. 加密狗是什么?一次性给您说全加密狗的概念
  17. 35+的测试人都去哪儿了?所谓“青春饭”真的只是在贩卖焦虑吗?
  18. CRM系统主要包含什么内容
  19. 解读redis的配置文件--redis.conf
  20. 关于CSS粘性定位——sticky

热门文章

  1. 计算机专业英语 unit 5 fundamentals,计算机专业英语Unit 5
  2. PHP支付宝APP支付接口
  3. ros系统下常用的shell命令
  4. 光模块外形类型QSFP56你知道多少?
  5. Windows启动进阶-孙宇彤-专题视频课程
  6. linux沙箱隔离_Android系统的沙箱隔离机制
  7. java 学习之Stream流
  8. VBA隐藏Word表格行
  9. JavaScript--【JS】排他思想
  10. 元宇宙炒房真热起来了?