Jenkins windows slave error error:error cloning remote repo ' origin '

Source: Internet
Author: User

git clone ssh is successful on slave, but Jenkins calls the slave node to report the following error:

Error:error cloning remote repo ' origin ' hudson.plugins.git.GitException:Could not init C:\lebo\workspace\repo1at Org.jenkinsci.plugins.gitclient.cligitapiimpl$5.execute (cligitapiimpl.java:717) at Org.jenkinsci.plugins.gitclient.cligitapiimpl$2.execute (cligitapiimpl.java:511) 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:181) at Hudson.remoting.UserRequest.perform ( userrequest.java:52) at Hudson.remoting.request$2.run (request.java:336) at Hudson.remoting.interceptingexecutorservice$1.call (interceptingexecutorservice.java:68) at Java.util.concurrent.FutureTask.run (Unknown Source) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown SOURCE) at Java.util.concurrent.threadpoolexecutor$worker.run (Unknown source) at Hudson.remoting.engine$1$1.run ( engine.java:98) at Java.lang.ThreAd.run (Unknown Source) at ... remote call to Jnlp4-connect connection from 192.168.8.211/192.168.8.211:49194 (Native Method) at Hudson.remoting.Channel.attachCallSiteStackTrace (channel.java:1554) at Hudson.remoting.UserResponse.retrieve (userrequest.java:281) at Hudson.remoting.Channel.call (channel.java:839) at Org.jenkinsci.plugins.gitclient.remotegitimpl$commandinvocationhandler.execute (RemoteGitImpl.java:146) at SUN.REFLECT.NATIVEMETHODACCESSORIMPL.INVOKE0 (Native Method) at Sun.reflect.NativeMethodAccessorImpl.invoke ( nativemethodaccessorimpl.java:62) at Sun.reflect.DelegatingMethodAccessorImpl.invoke ( delegatingmethodaccessorimpl.java:43) at Java.lang.reflect.Method.invoke (method.java:498) at Org.jenkinsci.plugins.gitclient.remotegitimpl$commandinvocationhandler.invoke (RemoteGitImpl.java:132) at Com.sun.proxy. $Proxy 77.execute (Unknown Source) at Hudson.plugins.git.GitSCM.retrieveChanges (gitscm.java:1083) at Hudson.plugins.git.GitSCM.checkout (gitscm.java:1123) at Hudson.scm.SCM.checkout (scm.java:495) at Hudson.model.AbstractProject.checkout (abstractproject.java:1212) at hudson.model.abstractbuild$ Abstractbuildexecution.defaultcheckout (abstractbuild.java:560) at Jenkins.scm.SCMCheckoutStrategy.checkout ( scmcheckoutstrategy.java:86) at Hudson.model.abstractbuild$abstractbuildexecution.run (AbstractBuild.java:485) at Hudson.model.Run.execute (run.java:1735) at Hudson.model.FreeStyleBuild.run (freestylebuild.java:43) at Hudson.model.ResourceController.execute (resourcecontroller.java:97) at Hudson.model.Executor.run (Executor.java : 415) caused By:hudson.plugins.git.GitException:Error performing command:git init C:\lebo\workspace\repo1at Org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn (cligitapiimpl.java:1931) at Org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn (cligitapiimpl.java:1892) at Org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn (cligitapiimpl.java:1888) at Org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand (cligitapiimpl.java:1533) at ORG.JENKINSCI.plugins.gitclient.cligitapiimpl$5.execute (cligitapiimpl.java:715) at Org.jenkinsci.plugins.gitclient.cligitapiimpl$2.execute (cligitapiimpl.java:511) 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:181) at Hudson.remoting.UserRequest.perform ( userrequest.java:52) at Hudson.remoting.request$2.run (request.java:336) at Hudson.remoting.interceptingexecutorservice$1.call (interceptingexecutorservice.java:68) at Java.util.concurrent.FutureTask.run (Unknown Source) at Java.util.concurrent.ThreadPoolExecutor.runWorker (Unknown SOURCE) at Java.util.concurrent.threadpoolexecutor$worker.run (Unknown source) at Hudson.remoting.engine$1$1.run ( engine.java:98) at Java.lang.Thread.run (Unknown Source) caused by:java.io.IOException:Cannot run program ' Git ' (in Directory "C:\LEBO\WORKSPACE\REPO1"): CreateProcess error=2, the system cannot find the file specified. At Java.lang.ProcessBuilder.start (Unknown Source) at Hudson. Proc$localproc.<init> (proc.java:249) at Hudson. Proc$localproc.<init> (proc.java:218) at Hudson. Launcher$locallauncher.launch (launcher.java:930) at Hudson. Launcher$procstarter.start (launcher.java:450) at Org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn ( cligitapiimpl.java:1920) ... morecaused by:java.io.IOException:CreateProcess error=2, the system cannot find the file specified. At Java.lang.ProcessImpl.create (Native Method) at java.lang.processimpl.<init> (Unknown Source) at Java.lang.ProcessImpl.start (Unknown Source) ... Moreerror:error cloning remote repo ' origin ' finished:failure


Workaround: The tool location needs to be set on the Jenkins Master as follows:

Also: for the first download, you need to slave setup Ssh-key to Gerrit and need clone once to select Host Trust.

1.ssh-keygen-t rsa-c [email protected]

2.cat ~/.ssh/id_rsa.pub

3.git config--global user.email "[email protected]"

4.git config--global user.name "anl"

5.git config--global core.editor vim

6.git Clone ssh:xxxxxxx

Jenkins windows slave error error:error cloning remote repo ' origin '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.