title: Jenkins picks wrong git binary
body: <p>I have a Jenkins server (version <code>2.150.2</code>) running on Oracle Linux <code>6.9</code>. Git <code>1.7.1</code> is installed on server and binary available under <code>/usr/bin/git</code> (shows upon running <code>which git</code> command). </p>
  
  <p>My Windows slave is connected to this master and git is configured here as well. Still I am getting the following error: </p>
  
  <pre><code>Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "C:\Jenkins\workspace\x\y\z"): CreateProcess error=2, The system cannot find the file specified
  </code></pre>
  
  <p>Tried upgrading all plugins and restarting Jenkins to no avail.</p>
  
  <p>Somehow, the Jenkins git plugin is picking up the server git path instead of node. This is evident from console log:</p>
  
  <pre><code>...
  15:17:07 Cloning the remote Git repository
  15:17:08 Cloning repository xxx
  15:17:09  &gt; /usr/bin/git init C:\Jenkins\workspace\TestJobs\xxx\xxx # timeout=10
  ...
  </code></pre>
  
  <p>My Jenkins Git configurations:</p>
  
  <ul>
  <li><strong>Node (Windows)</strong> Git mentioned under <code>Tool Locations</code>:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/4VWtN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4VWtN.png" alt="enter image description here"></a></p>
  
  <ul>
  <li><strong>Server (Linux)</strong> Git mentioned under <code>Global Tool Configuration</code>:</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/Y7OO8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y7OO8.png" alt="enter image description here"></a></p>