title: How to clone a git repository via SSH public key authentication without using user name in git clause?
body: <p>I am using pass-phrase protected SSH public/private key authentication to access my git repository via SSH in Windows.</p>
  
  <p>First, I try the Putty solution by using plink.exe and pageant.exe.  I have GIT_SSH variable set to  plink.exe.</p>
  
  <p>If I attempt to clone a repository:</p>
  
  <pre><code>c:\&gt; git clone ssh://git.example.com/srv/repos/git/project.git project
  </code></pre>
  
  <p>I got error:</p>
  
  <pre><code>Cloning into project...
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>This is due to I didn't specify user name for ssh access.</p>
  
  <p>Adding user name will make the clone work:</p>
  
  <pre><code>c:\&gt; git clone ssh://user@git.example.com/srv/repos/git/project.git project
  </code></pre>
  
  <p>The reason I don't add user name to git clone is I am using submodule that doesn't specify user name in .gitmodules.  </p>
  
  <p>Is there anyway to make git + plink using user name specify somewhere else?</p>
  
  <p>Next, I try the default ssh.exe of msysgit, I may specify user name in %HOME%/.ssh/config.  However, I couldn't get ssh-agent.exe and ssh-add.exe work with passphrased protected private key.</p>