-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins ver. 1.580.1
Latest git-plugin
The job is configured to use the git command for unix.
Git authentication is key based.
When manually triggering the job, it works.
Git Polling does not work.
The Jenkins master is a windows machine, the slave is OS X 10.9
Started on Nov 11, 2014 7:26:49 PM
Using strategy: Default
[poll] Last Built Revision: Revision 4dd28ae36ea5534d2ad666e70edbcb22b412b3ff (refs/remotes/origin/develop)
using GIT_SSH to set credentials MobileDaily GitHub key
> git ls-remote -h git@bitbucket.org:alexmx/en-ios-internship.git develop # timeout=10
FATAL: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:alexmx/en-ios-internship.git develop
hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:alexmx/en-ios-internship.git develop
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:475)
at hudson.scm.SCM.poll(SCM.java:401)
at hudson.model.AbstractProject._poll(AbstractProject.java:1429)
at hudson.model.AbstractProject.poll(AbstractProject.java:1332)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:515)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:544)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@bitbucket.org:alexmx/en-ios-internship.git develop
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1442)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1223)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1136)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1127)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2057)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:509)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:473)
... 12 more
Caused by: java.io.IOException: Cannot run program "git": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:803)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1431)
... 18 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 24 more
Done. Took 22 ms
No changes
The message says:
Cannot run program "git": CreateProcess error=2, The system cannot find the file specified
That usually means the git program cannot be found by the Jenkins process. Since you say that Jenkins is configured to use git on Unix, I assume you do not have git installed on the windows master.
Since it works when started without polling, I assume the job is using the default of fast remote polling. That means the job attempts to execute the git program on the master to poll for changes, rather than requiring a workspace on the slave. The system cannot find the file specified probably indicates that the git program is not available on the master, but is available on the slave.
If that is the case, the work around is to add the "Advanced clone behaviour" and "Require workspace for polling". That will prevent the master server from performing the poll.
Another work around would be to install git on the windows master server and tell Jenkins where to find the Windows git installation.