I have a Windows 7 and a Windows Server 2012 slave with the Jenkins agent and Cygwin already set up. I want to avoid Cygwin and just use the Git Bash shell that comes with Git f
Install git-bash
Ensure the Git\bin folder (i.e.: C:\Program Files\Git\bin) is in the global search path, in order for Jenkins to find sh.exe
to update path in windows use following command
setx path "%path%;C:\Program Files\Git\bin"
or have a look here https://www.windows-commandline.com/set-path-command-line/
to make nohup available for Jenkins
mklink "C:\Program Files\Git\bin\nohup.exe" "C:\Program Files\git\usr\bin\nohup.exe"
mklink "C:\Program Files\Git\bin\msys-2.0.dll" "C:\Program Files\git\usr\bin\msys-2.0.dll"
mklink "C:\Program Files\Git\bin\msys-iconv-2.dll" "C:\Program Files\git\usr\bin\msys-iconv-2.dll"
mklink "C:\Program Files\Git\bin\msys-intl-8.dll" "C:\Program Files\git\usr\bin\msys-intl-8.dll"
That's it now you can run shell commands
Have fun