hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master

Jenkins JIRA | Kuber Kaul | 2 years ago
  1. 0

    I have a jenkins instance which has a windows slave machine attached. I also have a job running which resides in github and I have the trigger - "Build when a change is pushed to GitHub" set. as I push a change to github, there is no build triggered on jenkins. I check and see that the payload does get tranferred to jenkins in the "Github hook log" but I get the following error: Using strategy: Default [poll] Last Built Revision: Revision ce6a183e834a3e31afa0eb83a4418b0619c8642b (origin/master) > "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master # timeout=10 FATAL: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:462) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1428) at hudson.model.AbstractProject.poll(AbstractProject.java:1331) at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1444) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460) ... 13 more Caused by: java.io.IOException: Cannot run program ""C:\Program Files (x86)\Git\cmd\git.exe"": error=2, No such file or directory Basically complains about not being able to run the command C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master But as I manually go into my slave machine and run the command, it works fine. Please note that 1. I have made the adjustment where jenkins slave service logs in as admin so that it has all permissions. 2. My default jenkins server is a linux box and the slave machine is a windows box. Obviously both have different git executable path. So I am wondering if jenkins runs this command on my linux box for some reason. I do have the project setup to run on the windows slave box only and that works fine as it builds fine(so it is able to find the git executable for the job) Any pointers? Also does anyone know how github plugin for jenkins works with slave machines(does it look for git in the slave or does it go to where jenkins resides, as that might be the source, though have no idea what the solution for that weird case would be?)

    Jenkins JIRA | 2 years ago | Kuber Kaul
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
  2. 0

    I have a jenkins instance which has a windows slave machine attached. I also have a job running which resides in github and I have the trigger - "Build when a change is pushed to GitHub" set. as I push a change to github, there is no build triggered on jenkins. I check and see that the payload does get tranferred to jenkins in the "Github hook log" but I get the following error: Using strategy: Default [poll] Last Built Revision: Revision ce6a183e834a3e31afa0eb83a4418b0619c8642b (origin/master) > "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master # timeout=10 FATAL: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:462) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) at hudson.model.AbstractProject._poll(AbstractProject.java:1428) at hudson.model.AbstractProject.poll(AbstractProject.java:1331) at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1444) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460) ... 13 more Caused by: java.io.IOException: Cannot run program ""C:\Program Files (x86)\Git\cmd\git.exe"": error=2, No such file or directory Basically complains about not being able to run the command C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master But as I manually go into my slave machine and run the command, it works fine. Please note that 1. I have made the adjustment where jenkins slave service logs in as admin so that it has all permissions. 2. My default jenkins server is a linux box and the slave machine is a windows box. Obviously both have different git executable path. So I am wondering if jenkins runs this command on my linux box for some reason. I do have the project setup to run on the windows slave box only and that works fine as it builds fine(so it is able to find the git executable for the job) Any pointers? Also does anyone know how github plugin for jenkins works with slave machines(does it look for git in the slave or does it go to where jenkins resides, as that might be the source, though have no idea what the solution for that weird case would be?)

    Jenkins JIRA | 2 years ago | Kuber Kaul
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master
  3. 0

    [JENKINS-24809] Github-Jenkins Trigger issue with slave - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h master
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    No sure if this is as github-plugin issue or if this plugin is relying on some other git API. But for {{private}} repositories, when I configure the {{Branches to build - Branch Specifier}} to anything that is no empty or {{***}} (ie. refs/heads/*) , {{GitHub Hook Log}} shows the following error and the jobs does not get triggered: {code} Started on 16/10/2015 2:11:40 PM Using strategy: Default [poll] Last Built Revision: Revision 9d1d66939474b01048ec2cdc8c5cd60b7438606d (origin/develop) using .gitcredentials to set credentials > git --version # timeout=10 > git init /var/tmp/hudson979795132853035389tmp # timeout=10 > git config --local credential.username buildboy2 # timeout=10 > git config --local credential.helper store --file=/var/tmp/git1493121951203369777.credentials # timeout=10 > git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo # timeout=10 > git config --local --remove-section credential # timeout=10 FATAL: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject._poll(AbstractProject.java:1454) at hudson.model.AbstractProject.poll(AbstractProject.java:1357) at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:99) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2376) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527) ... 13 more Done. Took 0.17 sec No changes {code} *Note1:* I have tried all the combination described in the help of {{Branches to build - Branch Specifier}} {code} refs/heads/* refs/heads/master origin/master origin/* master {code} They all come with the same issues. If I leave that empty or I set it to {{**}} this starts to work as expected. *Note2:* If I leave the branch speccifier set to {{refs/head/master}} and I convert my {{private}} repo into a {{public}} in github this works fine, no error found and the job is triggered correctly Please let me know if you need more information

    Jenkins JIRA | 1 year ago | Federico Naum
    hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found
  6. 0

    No sure if this is as github-plugin issue or if this plugin is relying on some other git API. But for {{private}} repositories, when I configure the {{Branches to build - Branch Specifier}} to anything that is no empty or {{***}} (ie. refs/heads/*) , {{GitHub Hook Log}} shows the following error and the jobs does not get triggered: {code} Started on 16/10/2015 2:11:40 PM Using strategy: Default [poll] Last Built Revision: Revision 9d1d66939474b01048ec2cdc8c5cd60b7438606d (origin/develop) using .gitcredentials to set credentials > git --version # timeout=10 > git init /var/tmp/hudson979795132853035389tmp # timeout=10 > git config --local credential.username buildboy2 # timeout=10 > git config --local credential.helper store --file=/var/tmp/git1493121951203369777.credentials # timeout=10 > git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo # timeout=10 > git config --local --remove-section credential # timeout=10 FATAL: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:529) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:381) at hudson.scm.SCM.poll(SCM.java:398) at hudson.model.AbstractProject._poll(AbstractProject.java:1454) at hudson.model.AbstractProject.poll(AbstractProject.java:1357) at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73) at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:99) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:119) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1640) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1388) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1282) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1273) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2376) at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:583) at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:527) ... 13 more Done. Took 0.17 sec No changes {code} *Note1:* I have tried all the combination described in the help of {{Branches to build - Branch Specifier}} {code} refs/heads/* refs/heads/master origin/master origin/* master {code} They all come with the same issues. If I leave that empty or I set it to {{**}} this starts to work as expected. *Note2:* If I leave the branch speccifier set to {{refs/head/master}} and I convert my {{private}} repo into a {{public}} in github this works fine, no error found and the job is triggered correctly Please let me know if you need more information

    Jenkins JIRA | 1 year ago | Federico Naum
    hudson.util.IOException2: hudson.plugins.git.GitException: Command "git -c core.askpass=true ls-remote -h http://github.mycompamy.com/myorg/myrepo" returned status code 128: stdout: stderr: remote: Repository not found. fatal: repository 'http://github.mycompamy.com/myorg/myrepo/' not found

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Error performing command: "C:\Program Files (x86)\Git\cmd\git.exe" ls-remote -h https://xx/xx/xx master

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.getHeadRev
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1444)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1225)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1138)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1129)
      5. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2059)
      5 frames
    3. Hudson GIT plugin
      GitSCM.compareRemoteRevisionWith
      1. hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495)
      2. hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460)
      2 frames
    4. Hudson
      AbstractProject.poll
      1. hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
      2. hudson.scm.SCM.poll(SCM.java:374)
      3. hudson.model.AbstractProject._poll(AbstractProject.java:1428)
      4. hudson.model.AbstractProject.poll(AbstractProject.java:1331)
      4 frames
    5. com.cloudbees.jenkins
      GitHubPushTrigger$1.run
      1. com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73)
      2. com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98)
      2 frames
    6. Hudson
      SequentialExecutionQueue$QueueEntry.run
      1. hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
      1 frame
    7. jenkins.util
      ContextResettingExecutorService$1.run
      1. jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      1 frame
    8. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      5. java.lang.Thread.run(Thread.java:744)
      5 frames