ERROR: Error cloning remote repo ‘origin’

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)\Git\cmd\git.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)\Git\cmd\git.exe

See screenshot:

Leave a Comment

tech