Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning repository call git.exe #42

Closed
Liryna opened this issue Jun 24, 2014 · 6 comments
Closed

Cloning repository call git.exe #42

Liryna opened this issue Jun 24, 2014 · 6 comments

Comments

@Liryna
Copy link

Liryna commented Jun 24, 2014

Hi,

My Master is a Windows and slave who host the containers is on debian.

I have try evarga/jenkins-slave container and my own. Each times I have this error:
(I have install git on both and commit)

Cloning repository git@***:***
 > git.exe init /home/jenkins
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/jenkins
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:476)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:379)
    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:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:328)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
Caused by: hudson.plugins.git.GitException: Error performing command: git.exe init /home/jenkins
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1332)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1301)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1297)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1084)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:474)
    ... 12 more
Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "/home/jenkins"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:775)
    at hudson.Launcher$ProcStarter.start(Launcher.java:355)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1321)
    ... 16 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:135)
    at java.lang.ProcessImpl.start(ProcessImpl.java:130)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
    ... 21 more
ERROR: null

Otherwise I have no problem if I select directly the slave debian.

Does someones have a idea about it ?

I use version 0.6.2.

@thomassuckow
Copy link
Contributor

Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "/home/jenkins"): error=2, No such file or directory

Your git setup in Jenkins appears to be messed up. It looks like it is trying to use a windows install of Git on linux.

@Liryna
Copy link
Author

Liryna commented Jun 24, 2014

Oh yes you are right, strange that only happens now :O

@dungnt081191
Copy link

dungnt081191 commented Jul 5, 2018

in the same issue like @Liryna , how do you fix it?

@saipavan9
Copy link

What is the solution to this issue??

@Liryna
Copy link
Author

Liryna commented Jun 15, 2020

Sorry that was a while ago I cannot remember.

@thomassuckow
Copy link
Contributor

@saipavan9 You need to change the settings for git in the Jenkins Global Tool Configuration.

Assuming you have jenkins installed on windows, add another configuration for git without .exe and then choose it in your Job that uses docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants