用Jenkins自动化搭建测试环境,Jenkins构建任务

关键异常抓取

git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git (git.exe init # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git)

具体异常抓取

运行报这个错误,前面查ip的任务可以
由用户admin启动
在远程节点testDev上构建在工作空间/root/.jenkins/workspace/TestDev中
克隆远程Git存储库
克隆存储库git@github.com:zhaoqi66/order.git> git.exe init /root/.jenkins/workspace/TestDev/order#timeout = 10
错误:克隆远程repo'origin'时出错
hudson.plugins.git.GitException:无法初始化/root/.jenkins/workspace/TestDev/order
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 5.execute(CliGitAPIImpl.java:772)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 2.execute(CliGitAPIImpl.java:564)
在org.jenkinsci.plugins.gitclient.RemoteGitImpl $ CommandInvocationHandler $ 1.call(RemoteGitImpl.java:153)
在org.jenkinsci.plugins.gitclient.RemoteGitImpl $ CommandInvocationHandler $ 1.call(RemoteGitImpl.java:146)
在hudson.remoting.UserRequest.perform(UserRequest.java:212)
在hudson.remoting.UserRequest.perform(UserRequest.java:54)
在hudson.remoting.Request $ 2.run(Request.java:369)
在hudson.remoting.InterceptingExecutorService $ 1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)
在java.lang.Thread.run(Thread.java:748)
抑制:hudson.remoting.Channel $ CallSiteStackTrace:远程调用testDev
在hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
在hudson.remoting.UserRequest $ ExceptionResponse.retrieve(UserRequest.java:357)
在hudson.remoting.Channel.call(Channel.java:955)
在org.jenkinsci.plugins.gitclient.RemoteGitImpl $ CommandInvocationHandler.execute(RemoteGitImpl.java:146)
at sun.reflect.GeneratedMethodAccessor556.invoke(未知来源)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
在org.jenkinsci.plugins.gitclient.RemoteGitImpl $ CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
在com.sun.proxy。$ Proxy70.execute(未知来源)
在hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
在hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
在hudson.scm.SCM.checkout(SCM.java:504)
在hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
在jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
在hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:499)
在hudson.model.Run.execute(Run.java:1815)
在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
在hudson.model.ResourceController.execute(ResourceController.java:97)
在hudson.model.Executor.run(Executor.java:429)
引起:hudson.plugins.git.GitException:执行命令时出错:git.exe init /root/.jenkins/workspace/TestDev/order
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2009)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1966)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1597)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl $ 5.execute(CliGitAPIImpl.java:770)
......还有11个
引起:java.io.IOException:无法运行程序“git.exe”(在目录“/root/.jenkins/workspace/TestDev/order”):error = 2,没有这样的文件或目录
在java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
在hudson.Proc $ LocalProc。<init>(Proc.java:249)
在hudson.Proc $ LocalProc。<init>(Proc.java:218)
在hudson.Launcher $ LocalLauncher.launch(Launcher.java:929)
在hudson.Launcher $ ProcStarter.start(Launcher.java:449)
在org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1998)
......还有15个
引起:java.io.IOException:error = 2,没有这样的文件或目录
at java.lang.UNIXProcess.forkAndExec(Native Method)
在java.lang.UNIXProcess。<init>(UNIXProcess.java:247)
在java.lang.ProcessImpl.start(ProcessImpl.java:134)
在java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
......还有20个
错误:克隆远程repo'origin'时出错
完成:失败

解决方案:你需要配置Git在服务器上的运行地址

解决思路分析:

由于我是要将项目构建在Linux的虚拟机中,
所以需要在任务指定运行的节点上配置服务器上的git的运行地址。
  • 1、查找并复制GIT中在服务器上的运行地址
which git

  • 2、在Jenkins上,系统管理 - >节点管理 - > LinuxEvn,配置GIT中在Linux的虚拟机上的运行地址




  • 3、保存。再次构建就可以了。


git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git相关推荐

  1. 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 ...

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

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

  3. 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部署任务 ...

  4. hudson.plugins.git.GitException

    使用jenkins构建工程时报错 [EnvInject] - Loading node environment variables. Building in workspace /data/jenki ...

  5. Jenkins构建时报错 GitERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException

    --昨夜西风凋碧树,独上高楼,望尽天涯路 Jenkins + GitLab持续集成时遇到如下错误: ERROR: Error cloning remote repo 'origin' hudson.p ...

  6. .Net Framework 4.5.1 ASP.NET MVC 5 下新建视图报“错误 运行所选代码生成器时出错 无法检索元数据 没有为该对象定义无参数构造函数”...

    当在控制器中新建视图的时候,选择的视图界面如下: 执行添加后报如下错误: 错误的内容为: 错误 运行所选代码生成器时出错 无法检索"XXX"的元数据 没有为该对象定义无参数构造函数 ...

  7. Google Chrome 更新失败(错误:3)检查更新时出错

    现在 Google Chrome 的稳定版都已经发布 39.0 版本了,我机上还是 31, 本想在线更新一下,结果点击菜单项中的"关于 Google Chrome"后,进入的界面提 ...

  8. Caused by: hudson.plugins.git.GitException: Command “git fetch --tags --progress -- https://github.

    一.问题描述: 由于最近一直在搞java开发,没怎么搞cicd了,突然想搞搞自己的项目,所以跑了一下jenkins,却发现原来搭好的job执行失败,GitHub上面的代码拉不下来 ERROR: Err ...

  9. oracle写入导出文件时出错,帮忙!EXP-00015:错误!EXP-00002: 写入导出文件时出错

    今天在同一个目录下做Release 9.2.0.6.0EXP导出,导了几个小表没问题,但是大点的上万条记录的表就有问题 1:小表正常: GXdbC% exp c_perf/gxcperf@gxdbc ...

最新文章

  1. github/python/ show me the code 25题(一)
  2. 我开发的代码,如何申请版权_代码简介:我花了3个月时间申请开发人员职位。 这是我学到的。...
  3. 阿里云 apt-get update 403
  4. MySQL事务的四种隔离级别,mysql中的不可重复读和幻读的区别,Repeatable read可重复读隔离级别下怎么不存在幻读问题?
  5. c语言行列倒置算法,循环行列的元素倒置。求指点
  6. 当年中国的“四大工学院”,现在都咋样了?
  7. [前台]---关于input标签的value值
  8. 一招判断三元催化堵塞_汽车的氧传感器和三元催化器故障如何判断呢?用这些方法判断...
  9. 【Educational Codeforces Round 48 (Rated for Div. 2) D】Vasya And The Matrix
  10. dao-service-servlet-jsp构建简易web通讯录(三层开发)软件安装
  11. mysql 延时update_转 MySQL延迟更新索引(delay_key_write)
  12. 袁玉玮:简介人工智能在基金界的应用现状 (二)卖方交易员被冲击
  13. 第十届“泰迪杯”挑战赛B题,获国家一等奖,提名国特,电力负荷预测及突变点检测分析论文、思路、程序分享
  14. 抽象代数之循环群的自同构群是循环群
  15. Vue中@click.stop与@click.prevent
  16. 码市coding不能下载
  17. linux 应用软件打包工具
  18. 阿里云ECS服务器安装Mysql全过程
  19. 数据事务及ACID特性、事务回滚
  20. 利用PyDoc查看python文档及生成HTML

热门文章

  1. android item三种,Android RecyclerView中的ItemDecoration的几种绘制方法
  2. jta mysql_JTA 使用 MySQL 分布式事务
  3. 手机系统安装打印机服务器错误代码,OKI打印机报错?各型号代码故障解决方法...
  4. 2016-2017NBU期末考试记录
  5. opencv mat数据剪裁感兴趣的部分处理方法
  6. Snowflake如日中天是否代表Hadoop已死?大数据体系到底是什么?
  7. 2020亚太内容分发大会 阿里云荣获“边缘计算领航企业”奖
  8. 疫情攻坚战“分秒必争” 宜搭免费开放疫情相关应用
  9. 函数运行环境系统动态链接库版本太低?函数计算 fun 神助力分忧解难
  10. 《2018年云上挖矿态势分析报告》发布,非Web类应用安全风险需重点关注