-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Windows master, Mac slave
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-24125] Git Polling fails for job restricted to Mac OS X slave (with Windows master)
Resolution | New: Not A Defect [ 7 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Resolution | Original: Not A Defect [ 7 ] | |
Status | Original: Closed [ 6 ] | New: Reopened [ 4 ] |
I strongly suspect that you have a configuration problem. The "ls-remote" command is executed on the master node, though it likely uses the git executable defined by that job.
Please confirm that your master node has the git executable correctly specified for the master node (git.exe), and that the OS/X node has the git executable correctly specified for it (/usr/local/bin/git).
The location of the default git executable is set in the node configuration page for the OS/X slave node. It needs to be "/usr/local/bin/git".
The location of the default git executable for the master node needs to be configured in the "Git installations" section of the "Manage Jenkins" page.