由用戶?admin?啟動
在遠程節(jié)點?testDev?上構(gòu)建?在工作空間?/root/.jenkins/workspace/TestDev?中
Cloning?the?remote?Git?repository
Cloning?repository?git@github.com:zhaoqi66/order.git
?>?git.exe?init?/root/.jenkins/workspace/TestDev/order?#?timeout=10
ERROR:?Error?cloning?remote?repo?'origin'
hudson.plugins.git.GitException:?Could?not?init?/root/.jenkins/workspace/TestDev/order
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:772)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:564)
at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at?hudson.remoting.UserRequest.perform(UserRequest.java:212)
at?hudson.remoting.UserRequest.perform(UserRequest.java:54)
at?hudson.remoting.Request$2.run(Request.java:369)
at?hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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)
Suppressed:?hudson.remoting.Channel$CallSiteStackTrace:?Remote?call?to?testDev
at?hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at?hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at?hudson.remoting.Channel.call(Channel.java:955)
at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
at?sun.reflect.GeneratedMethodAccessor556.invoke(Unknown?Source)
at?sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown?Source)
at?java.lang.reflect.Method.invoke(Unknown?Source)
at?org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
at?com.sun.proxy.$Proxy70.execute(Unknown?Source)
at?hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
at?hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
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:1815)
at?hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at?hudson.model.ResourceController.execute(ResourceController.java:97)
at?hudson.model.Executor.run(Executor.java:429)
Caused?by:?hudson.plugins.git.GitException:?Error?performing?command:?git.exe?init?/root/.jenkins/workspace/TestDev/order
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2009)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1966)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1597)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:770)
...?11?more
Caused?by:?java.io.IOException:?Cannot?run?program?"git.exe"?(in?directory?"/root/.jenkins/workspace/TestDev/order"):?error=2,?No?such?file?or?directory
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:929)
at?hudson.Launcher$ProcStarter.start(Launcher.java:449)
at?org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1998)
...?15?more
Caused?by:?java.io.IOException:?error=2,?No?such?file?or?directory
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)
...?20?more
ERROR:?Error?cloning?remote?repo?'origin'
Finished:?FAILURE
2018-09-14
https://blog.csdn.net/u013716535/article/details/82695891
2018-09-03
謝謝Fodee的分享,在網(wǎng)上查了一天,走了很多彎路
2018-07-24
非常感謝!
2018-07-22
我是在Windows上安裝的jenkins,根據(jù)老師的視頻教程構(gòu)建任務(wù)失敗如上截圖。
在網(wǎng)上找了幾天的方法都沒有解決問題,最后在知乎上向https://zhuanlan.zhihu.com/p/37232441 的作者請教才解決的問題。
解決方法:
由于我是要將項目構(gòu)建在linux虛擬機中,所以需要在任務(wù)指定運行的節(jié)點上配置服務(wù)器上git的運行地址。
1、查找并復制Git在服務(wù)器上的運行地址;
2、在jenkins上,系統(tǒng)管理->節(jié)點管理->LinuxEvn,配置git在linux虛擬機上的運行地址
3、保存。再次構(gòu)建就可以了。
anyway,感激上方鏈接中知乎文章的作者指教,感激涕零!
2018-07-22
這個問題誰可以解釋下,我查了很多方法都沒有解決,求救!?。。?/p>
2018-07-12
是因為在你的Linux系統(tǒng)中order1文件夾下面沒有文件。解決辦法是:把Tomcat、Git、maven安裝到windo系統(tǒng)上,問題就解決了
2018-07-12
遇到同樣的問題,都是怎么解決的呀
2018-07-05
同遇到這個問題,請問你有解決辦法了嘛
2018-06-24
這個解決了么?
2018-06-23
git.exe 是windows上的命令吧?
linux應(yīng)該使用的是`git init`,是不是你git環(huán)境配錯了