On Friday, February 16, 2018 at 1:24:46 PM UTC-7, naveen kumar wrote: > > Console Output Started by user admin Building on master in workspace > C:\Jenkins\JenkinsHome\workspace\HelloWorld Cloning the remote Git > repository Cloning repository > https://github.com/naveenaws2018/HelloWorld.git > <https://www.youtube.com/redirect?event=comments&q=https%3A%2F%2Fgithub.com%2Fnaveenaws2018%2FHelloWorld.git&redir_token=_DReAzBskQfUBrHNQoIR5ENkc9l8MTUxODg5ODQ4NUAxNTE4ODEyMDg1> > > > git.exe init C:\Jenkins\JenkinsHome\workspace\HelloWorld # timeout=10 ERROR: > Error cloning remote repo 'origin' Caused by: java.io.IOException: Cannot > run program "git.exe" (in directory > "C:\Jenkins\JenkinsHome\workspace\HelloWorld"): 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:1992) > ... > 16 more Caused by: java.io.IOException: CreateProcess error=2, The system > cannot find the file specified >
The program "git.exe" is not configured in the PATH for the Jenkins process on the agent running that command. There are several ways to fix that. You can add C:\Program Files\Git\bin to the PATH on that machine before starting the agent, then start the agent. You can define a tool which installs the Windows "portable git" on each agent automatically. You can configure the agent in Jenkins by adding a "tool location" which provides the absolute path to the git executable. You can enable JGit as a git implementation, then configure your job to use JGit instead of using command line git. Mark Waite > at java.lang.ProcessImpl.create(Native Method) at > java.lang.ProcessImpl.<init>(Unknown Source) at > java.lang.ProcessImpl.start(Unknown Source) ... 22 more ERROR: Error > cloning remote repo 'origin' Finished: FAILURE Please help > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/100ff1e8-f6f0-4b90-a294-611f610801c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
