My Windows slave can't find git. All other slaves (Linux) work correctly.

The slave is Windows 7 with Cygwin installed, running Cygwin sshd and git. 
The master connects to the slave via ssh and I am able to run bash commands 
using "execute shell" build step, like this:

Started by user John Tangney <http://build.sky/user/johnt>
[EnvInject] - Loading node environment variables.
Building remotely on win-build-slave1 
<http://build.sky/computer/win-build-slave1> in workspace 
c:\jenkins\workspace\JDT
[JDT] $ sh -xe C:\Users\jenkins\hudson5633305261937738873.sh
+ whoami
winbuild01\cyg_server
+ echo /home/jenkins
/home/jenkins
+ /usr/bin/git --version
git version 1.7.9
+ echo /bin/bash
/bin/bash
Finished: SUCCESS


The master is Jenkins 1.503 with Git plugin 1.1.19

But when I run a job that tries to clone a git repo, I get this:
Started by user John Tangney
[EnvInject] - Loading node environment variables.
Building remotely on win-build-slave1 in workspace c:\jenkins\workspace\JDT
Checkout:JDT / c:\jenkins\workspace\JDT - 
hudson.remoting.Channel@771e7283:win-build-slave1
Using strategy: Default
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository origin
Error trying to determine the git version: Error performing command: 
/usr/bin/git --version
Assuming 1.6
ERROR: Error cloning remote repo 'origin' : Could not clone 
[email protected]:DataSystems/JDT.git
hudson.plugins.git.GitException: Could not clone 
[email protected]:DataSystems/JDT.git
at hudson.plugins.git.GitAPI.clone(GitAPI.java:251)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1121)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1063)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2348)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(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: 
/usr/bin/git clone -o origin [email protected]:DataSystems/JDT.git 
c:\jenkins\workspace\JDT
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:793)
at hudson.plugins.git.GitAPI.access$000(GitAPI.java:39)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:247)
at hudson.plugins.git.GitAPI$1.invoke(GitAPI.java:227)
at hudson.FilePath.act(FilePath.java:865)
at hudson.FilePath.act(FilePath.java:838)
at hudson.plugins.git.GitAPI.clone(GitAPI.java:227)
... 12 more
Caused by: java.io.IOException: Cannot run program "/usr/bin/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:763)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at hudson.Launcher$ProcStarter.join(Launcher.java:360)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:774)
... 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)
... 25 more

It can't find /usr/bin/git? Maybe the git plugin makes assumptions about 
the environment? Maybe it's assuming a windows-like file system, rather 
than the Cygwin rooted file system? Here's the slave log:
ALLUSERSPROFILE='C:\ProgramData'
BASH=/bin/bash
BASHOPTS=cmdhist:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_EXECUTION_STRING=set
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="1" [2]="10" [3]="4" [4]="release" 
[5]="i686-pc-cygwin")
BASH_VERSION='4.1.10(4)-release'
COMPUTERNAME=WINBUILD01
COMSPEC='C:\Windows\system32\cmd.exe'
DIRSTACK=()
EUID=1007
GROUPS=()
HOME=/home/jenkins
HOMEDRIVE=C:
HOMEPATH='\cygwin\home\jenkins'
HOSTNAME=WINBUILD01
HOSTTYPE=i686
IFS=$' \t\n'
LOGNAME=jenkins
LOGONSERVER='\\WINBUILD01'
MACHTYPE=i686-pc-cygwin
MAIL=/var/spool/mail//jenkins
OPTERR=1
OPTIND=1
OS=Windows_NT
OSTYPE=cygwin
PATH=/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/bin
PATHEXT='.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PIPESTATUS=([0]="0")
PPID=3328
PROGRAMFILES='C:\Program Files (x86)'
PS4='+ '
PWD=/home/jenkins
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
SSH_CLIENT='10.10.1.100 57994 22'
SSH_CONNECTION='10.10.1.100 57994 10.10.1.116 22'
SYSTEMDRIVE=C:
SYSTEMROOT='C:\Windows'
TERM=dumb
UID=1007
USER=jenkins
USERDOMAIN=WINBUILD01
USERNAME=cyg_server
USERPROFILE='C:\Users\jenkins'
WINDIR='C:\Windows'
_=bash
[06/06/13 19:21:17] [SSH] Checking java version of java
[06/06/13 19:21:17] [SSH] java -version returned 1.6.0_43.
[06/06/13 19:21:17] [SSH] Starting sftp client.
[06/06/13 19:21:17] [SSH] Copying latest slave.jar...
[06/06/13 19:21:17] [SSH] Copied 284,160 bytes.
[06/06/13 19:21:17] [SSH] Starting slave process: cd 'c:\jenkins' && java 
-XX:MaxPermSize=256m -jar slave.jar
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version: 2.22
This is a Windows slave
Copied maven-agent.jar
Copied maven3-agent.jar
Copied maven3-interceptor.jar
Copied maven-interceptor.jar
Copied maven2.1-interceptor.jar
Copied plexus-classworld.jar
Copied classworlds.jar
Jun 6, 2013 12:21:22 PM com.youdevise.hudson.slavestatus.SlaveListener call
INFO: Slave-status listener starting
Jun 6, 2013 12:21:22 PM com.youdevise.hudson.slavestatus.SocketHTTPListener 
waitForConnection
INFO: Slave-status listener ready on port 3141
Slave successfully connected and online

Is it just a matter of forcing the git plugin to recognize the Cygwin 
layout?

I would be most grateful for any help with this!
--johnt

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to