git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git
生活随笔
收集整理的這篇文章主要介紹了
git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
用Jenkins自動(dòng)化搭建測(cè)試環(huán)境,Jenkins構(gòu)建任務(wù)
關(guān)鍵異常抓取
git.exe init#timeout = 10錯(cuò)誤:克隆遠(yuǎn)程repo'origin'時(shí)出錯(cuò)hudson.plugins.git (git.exe init # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git)具體異常抓取
運(yùn)行報(bào)這個(gè)錯(cuò)誤,前面查ip的任務(wù)可以 由用戶admin啟動(dòng) 在遠(yuǎn)程節(jié)點(diǎn)testDev上構(gòu)建在工作空間/root/.jenkins/workspace/TestDev中 克隆遠(yuǎn)程Git存儲(chǔ)庫(kù) 克隆存儲(chǔ)庫(kù)git@github.com:zhaoqi66/order.git> git.exe init /root/.jenkins/workspace/TestDev/order#timeout = 10 錯(cuò)誤:克隆遠(yuǎn)程repo'origin'時(shí)出錯(cuò) hudson.plugins.git.GitException:無(wú)法初始化/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:遠(yuǎn)程調(diào)用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(未知來(lái)源) 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(未知來(lái)源) 在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:執(zhí)行命令時(shí)出錯(cuò):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個(gè) 引起:java.io.IOException:無(wú)法運(yùn)行程序“git.exe”(在目錄“/root/.jenkins/workspace/TestDev/order”):error = 2,沒(méi)有這樣的文件或目錄 在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個(gè) 引起:java.io.IOException:error = 2,沒(méi)有這樣的文件或目錄 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個(gè) 錯(cuò)誤:克隆遠(yuǎn)程repo'origin'時(shí)出錯(cuò) 完成:失敗解決方案:你需要配置Git在服務(wù)器上的運(yùn)行地址
解決思路分析:
由于我是要將項(xiàng)目構(gòu)建在Linux的虛擬機(jī)中, 所以需要在任務(wù)指定運(yùn)行的節(jié)點(diǎn)上配置服務(wù)器上的git的運(yùn)行地址。- 1、查找并復(fù)制GIT中在服務(wù)器上的運(yùn)行地址
- 2、在Jenkins上,系統(tǒng)管理 - >節(jié)點(diǎn)管理 - > LinuxEvn,配置GIT中在Linux的虛擬機(jī)上的運(yùn)行地址
- 3、保存。再次構(gòu)建就可以了。
總結(jié)
以上是生活随笔為你收集整理的git.exe init#timeout = 10错误:克隆远程repo'origin'时出错hudson.plugins.git的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 04_SSM整合ActiveMQ支持多种
- 下一篇: linux 查看目录下文件个数