git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git
生活随笔
收集整理的这篇文章主要介绍了
git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
用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中在服务器上的运行地址
- 2、在Jenkins上,系统管理 - >节点管理 - > LinuxEvn,配置GIT中在Linux的虚拟机上的运行地址
- 3、保存。再次构建就可以了。
总结
以上是生活随笔为你收集整理的git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 04_SSM整合ActiveMQ支持多种
- 下一篇: rsync 一条命令实现远程文件传输