title: npm install fails due to private git repository both ssh and https connections
body: <p>I have the following package.json file and I am trying to run npm install, but it fails.</p>
  
  <pre><code>    "test": "git+https://&lt;TOKEN&gt;@github.build.test.com/test.git",
  </code></pre>
  
  <p>I have ssh key matched to github. However even I write the following, it always run with https.</p>
  
  <pre><code>    "test": "git+ssh://git@github.build.test.com/test.git",
  </code></pre>
  
  <p>In both case, I encounter following error message</p>
  
  <pre><code>npm ERR! Error while executing:
  npm ERR! C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.build.test.com/test.git
  npm ERR!
  npm ERR! remote: Password authentication is not available for Git operations.
  npm ERR! remote: You must use a personal access token or SSH key.
  npm ERR! remote: See https://github.build.test.com/settings/tokens or https://github.build.test.com/settings/ssh
  npm ERR! fatal: unable to access 'https://github.build.test.com/test.git/': The requested URL returned error: 403
  npm ERR!
  npm ERR! exited with error code: 128
  </code></pre>
  
  <p>If I run above command separately, it works.</p>
  
  <pre><code>git ls-remote -h -t https://&lt;TOKEN&gt;@github.build.test.com/test.git
  git ls-remote -h -t ssh://git@github.build.test.com/test.git
  </code></pre>
  
  <p>How can I fix it? </p>
  
  <p>Thanks</p>