hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release

Jenkins JIRA | Charles Doucette | 2 years ago
  1. 0

    I have defined two installations of git on our Windows master node: Default: git.exe (found in the PATH) Mac: /usr/local/bin/git (not found in the PATH) I have certain jobs that must run on a Mac. For those jobs, I have selected "Mac" for the git executable. When those jobs try to poll github for changes, they get errors like this: Started on Aug 5, 2014 6:38:03 PM Using strategy: Default [poll] Last Built Revision: Revision 33ce43e454fd2447f548f18dc3bc404ff1a2b021 (origin/release) > /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release # timeout=10 FATAL: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) ... Caused by: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1414) ... Caused by: java.io.IOException: Cannot run program "/usr/local/bin/git": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) ... Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) ... I presume this fails because it is looking for /usr/local/bin/git on the Windows master node. When I manually build the job with that configuration - git works fine. If I switch the job's configuration to use the "Default" git executable (git.exe), then polling works fine, but when the job tries to run on the Mac then the git commands fail (since git.exe is not found on the Mac). So, until this issue is resolved somehow, either a) no jobs are started automatically, but they all build successfully when launched manually, or b) jobs are started automatically - but then they all fail to build. The job in question clones a specific branch of a repository from github. It is restricted to work on a slave node with the label of "iOS". There is a mac slave node with that label. We are running the latest LTS version (1.565.1) of Jenkins on a Windows server. FYI - this behavior worked fine on an older (1.x) version of this plugin. Thanks, Chuck

    Jenkins JIRA | 2 years ago | Charles Doucette
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
  2. 0

    [JENKINS-24125] Git Polling fails for job restricted to Mac OS X slave (with Windows master) - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
  3. 0

    I have defined two installations of git on our Windows master node: Default: git.exe (found in the PATH) Mac: /usr/local/bin/git (not found in the PATH) I have certain jobs that must run on a Mac. For those jobs, I have selected "Mac" for the git executable. When those jobs try to poll github for changes, they get errors like this: Started on Aug 5, 2014 6:38:03 PM Using strategy: Default [poll] Last Built Revision: Revision 33ce43e454fd2447f548f18dc3bc404ff1a2b021 (origin/release) > /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release # timeout=10 FATAL: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459) at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357) at hudson.scm.SCM.poll(SCM.java:374) ... Caused by: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1414) ... Caused by: java.io.IOException: Cannot run program "/usr/local/bin/git": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) ... Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) ... I presume this fails because it is looking for /usr/local/bin/git on the Windows master node. When I manually build the job with that configuration - git works fine. If I switch the job's configuration to use the "Default" git executable (git.exe), then polling works fine, but when the job tries to run on the Mac then the git commands fail (since git.exe is not found on the Mac). So, until this issue is resolved somehow, either a) no jobs are started automatically, but they all build successfully when launched manually, or b) jobs are started automatically - but then they all fail to build. The job in question clones a specific branch of a repository from github. It is restricted to work on a slave node with the label of "iOS". There is a mac slave node with that label. We are running the latest LTS version (1.565.1) of Jenkins on a Windows server. FYI - this behavior worked fine on an older (1.x) version of this plugin. Thanks, Chuck

    Jenkins JIRA | 2 years ago | Charles Doucette
    hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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 ssh:
  6. 0

    [JIRA] [git-client-plugin] (JENKINS-32712) Job with Git polling "succeeds" with "no changes" although the Git polling failed

    Google Groups | 10 months ago | michael...@mgm-tp.com (JIRA)
    hudson.util.IOException2: hudson.plugins.git.GitException: Command <span class="code-quote" style="color: #009100">&quot;git -c core.askpass=<span class="code-keyword" style="color: #000091; color: #009100">true</span> ls-remote -h ssh:<span class="code-comment" style="color: #808080">//someUser@localhost/example-projects/example1&quot;</span> returned status code 128: </span>stdout: stderr: fatal: Project not found: example-projects/example1 fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

    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.util.IOException2

      hudson.plugins.git.GitException: Error performing command: /usr/local/bin/git ls-remote -h git@github.com:everyscape/Mobile.git release

      at hudson.plugins.git.GitSCM.compareRemoteRevisionWith()
    2. Hudson GIT plugin
      GitSCM.compareRemoteRevisionWith
      1. hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459)
      1 frame
    3. Hudson
      SCM.poll
      1. hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
      2. hudson.scm.SCM.poll(SCM.java:374)
      2 frames