title: git plugin on windows command fails from Jenkins, succeeds in shell
body: <p>I'm setting up Jenkins on my windows build machine, with the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-" rel="nofollow">Git Plugin</a>. I'm using a directory on a network drive Z: as the git repository for now. I enter "z:\my\repo\path" for the Repository URL, and I get:</p>
  
  <pre><code>Failed to connect to repository : Command "git.exe -c core.askpass=true ls-remote -h z:\my\repo\path HEAD" returned status code 128:
  stdout:
  stderr: fatal: 'z:\my\repo\path' does not appear to be a git repository
  fatal: Could not read from remote repository.
  </code></pre>
  
  <p>Yet if I open a fresh command prompt and type that command, it works without error (and also no output):</p>
  
  <pre><code>&gt; git.exe -c core.askpass=true ls-remote -h z:\my\repo\path HEAD
  &gt; 
  </code></pre>
  
  <p>What may possibly be the issue? I am not even sure where to begin. I've set the <code>PATH</code> and <code>GIT_HOME</code> system environment variables and restarted Jenkins, so clearly it is finding the executable.</p>
  
  <p>I've tried the <code>file:///</code>-style path and had the same results.</p>
  
  <hr>
  
  <p>Output of the manual command with <code>GIT_CURL_VERBOSE=1</code> and <code>GIT_TRACE=1</code> set:</p>
  
  <pre><code>15:43:24.905801 git.c:348               trace: built-in: git 'ls-remote' '-h' 'z:\\my\\repo\\path' 'HEAD'
  15:43:24.905801 run-command.c:343       trace: run_command: 'git-upload-pack '\''z:\\my\\repo\\path'\'''
  </code></pre>