There was a regression in Git Plugin version 3.9.2 where Git tool locations configured for an agent are no longer being honored.
For example you may have
/usr/bin/git configured in your
Global Tool Configuration, but you have changed the
Tool Locations for your Windows agent. You see an error similar to the following where it is attempting to use the
Global Tool Configuration rather than the
Tool Locations configured for the agent:
Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "E:\workspace\Pipeline"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at hudson.Proc$LocalProc.<init>(Proc.java:249) at hudson.Proc$LocalProc.<init>(Proc.java:218) at hudson.Launcher$LocalLauncher.launch(Launcher.java:935) at hudson.Launcher$ProcStarter.start(Launcher.java:454) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2012)
- CloudBees Core on modern cloud platforms - Managed Master
- CloudBees Core on traditional platforms - Client Master
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Platform - Client Master
- Jenkins LTS
- Git Plugin
- Upgrade the Git Plugin to 3.9.3 or greater.