This wasted so much time on my Jenkins Windows slave.
I knew git was in the path because I executed "where git" in the build job's batch command.
where git
C:Program Files (x86)Gitcmdgit.exe
Apparently the Jenkins Git Plugin executes ** before ** the environment is inherited.
SET YOUR SLAVE's PATH to Git ( Just DO IT !! )
1) Go to your Windows slave configuration
Manage Jenkins > Manage Nodes
2) Select your slave configuration
3) Check Tool Locations under Node Properties
4) Enter complete path to git executable including git.exe
[x] Tool Locations
Name: (GIT) git
Home: C:Program Files (x86)Gitcmdgit.exe
See screenshot:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…