title: Can't use/debug SSH auth with Git for Windows
body: <p>I am using Git for Windows on Windows 10, I use GitExtensions as my GUI. To authenticate to various Git repositories, I use putty/pageant and I load up my keys into it. GitExtensions somehow works with this. Recently, I came across a Git repository at <a href="https://gitlab.example.com" rel="nofollow noreferrer">https://gitlab.example.com</a> where GitExtensions tries to do <code>git clone</code> and tells me: <code>fatal: protocol error: bad line length character: git@</code> I also tried using gitbash to do the clone manually. When I attempt to call <code>git clone</code> manually, git bash will ask me for password to <code>git@gitlab.example.com</code>. My existing pageant session with loaded key is ignored.</p>
  <p>I do not know how to debug or what the problem is. These are my current findings:</p>
  <ul>
  <li>GitExtensions has no git logging, so their cryptic message of <code>fatal: protocol error: bad line length character: git@</code> tells me nothing and I have no way to see the whole error that was returned.</li>
  <li>Git for Windows ignores my putty/pageant keys and keeps trying to look for keys in <code>.ssh</code> directory.</li>
  <li>If I create system environment variable <code>GIT_SSH</code> with path to  <code>plink.exe</code>, Git simply ignores it. It keeps looking for keys in <code>.ssh</code> dir.</li>
  <li>When I run <code>set GIT_SSH</code> in <code>cmd</code>, it prints out: <code>GIT_SSH=C:\Program Files (x86)\GitExtensions\PuTTY\plink.exe</code>.</li>
  <li>When I run <code>set GIT_SSH</code> in git bash, it prints out: <code> </code>.</li>
  <li>When I run <code>export</code> in git bash, it will list variables and it will list <code>GIT_BASH</code> variable with correct value. I'm not sure what that means.</li>
  </ul>
  <p>So currently I have a Windows machine with Git installed and I can't connect to a repository using putty/pageant SSH integration. I have no way of even seeing the error, because neither Git, or GitExtensions will allow me to see the error message and Git will not use my putty/pageant SSH keys for authentication.</p>
  <p>I suspect that GitExtensions tries to use the SSH key through pageant.exe, but the server refuses it and responds with something like <code>git@gitlab.example.com password:</code> and GitExtensions detonates because it doesn't know what to do with it.</p>
  <p>I also do not understand why gitbash in Windows doesn't use the running pageant.exe instance to get the SSH keys from. According to dozens of threads on this forum, it should be done by simply setting up the <code>GIT_SSH</code> environment variable, but that doesn't happen in my case.</p>
  <p>How do I proceed?</p>