title: Visual Studio Code: Push to git works from Terminal but not when using the user interface
body: <p>Running Windows 8.1 64-bit with the following installed:</p>
  
  <ul>
  <li>Git for Bash (v2.24.1.windows.2) using MinGW-W64</li>
  <li>Visual Studio Code (v1.41.1)</li>
  </ul>
  
  <p>My personal SSH key (located at <code>%USERPROFILE%\.ssh</code>) has been generated and added to my GitHub account. <code>.bashrc</code> located at <code>%USERPROFILE</code> has been modified to add these lines:</p>
  
  <pre><code># Start ssh-agent to allow git to be used
  eval `ssh-agent -s`
  ssh-add ~/.ssh/id_rsa_personal
  </code></pre>
  
  <p>I start Git Bash (MINGW64) in a git repo. Now make changes to a file, <code>git add</code>, <code>git commit</code> and <code>git push</code> the changes to my git repo...and it works fine!</p>
  
  <p>For the standard Windows command prompt, I've created a file called <code>bashrc.cmd</code> with this code:</p>
  
  <pre><code>rem Start ssh-agent to use git from the Windows command line
  set GIT_PATH=C:\Program Files\Git
  call "%GIT_PATH%\cmd\start-ssh-agent.cmd"
  call "%GIT_PATH%\usr\bin\ssh-add.exe" "%USERPROFILE%\.ssh\id_rsa_personal"
  </code></pre>
  
  <p>Now, a new <code>REG_SZ</code> value called <code>AutoRun</code> in the key <code>HKLM\SOFTWARE\Microsoft\Command Processor</code> was created which points to the above file (<code>bashrc.cmd</code>)</p>
  
  <p>Start a command prompt, and now <code>ssh-agent</code> is started and my identity is added. As with Git Bash, <code>add</code>, <code>commit</code> and <code>push</code> work perfectly. Awesome!</p>
  
  <p>Now I load Visual Studio Code in my git repo. In the lower left, Code knows I'm inside a git repo:</p>
  
  <p><a href="https://i.stack.imgur.com/6ak9J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6ak9J.png" alt="master branch of my repo"></a></p>
  
  <p>Using the in-built Terminal in Code, I can <code>add</code>, <code>commit</code> and <code>push</code> changes to my git repo. Great!</p>
  
  <p>But now I try it with the user interface buttons. I can stage and commit changes and confirm in a separate command line windows using <code>git status</code> that these work as expected. But when I use the <code>Push</code> command, I get this error:</p>
  
  <p><a href="https://i.stack.imgur.com/xCmxC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xCmxC.png" alt="Permission denied to git repo"></a></p>
  
  <p>Return to the Code Terminal, or a Windows command prompt, or Git Bash, issue the command <code>git push</code> and the changes are sent to the remote repo correctly.</p>
  
  <p>Why is this not working with the Code <code>Push</code> command?</p>