title: Git Clone - fatal: The remote end hung up unexpectedly
body: <p>I am connecting from a Ubuntu laptop to a virtual machine via ssh.</p>
  
  <p>Within this VM, I am trying to git clone a repository with:</p>
  
  <pre><code>/home/httpd$ sudo git clone git@github.com:NexwayGroup/softgallery
  [sudo] password for jverstrynge: 
  Cloning into 'softgallery'...
  Permission denied (publickey).
  fatal: The remote end hung up unexpectedly
  </code></pre>
  
  <p>I have seen this <a href="https://stackoverflow.com/questions/15240815/git-fatal-the-remote-end-hung-up-unexpectedly">SO question</a> and the solution suggests modifying the git config with:</p>
  
  <pre><code>/home/httpd$ git config http.postBuffer 524288000
  error: could not lock config file .git/config: No such file or directory
  </code></pre>
  
  <p>But I am getting the above error. Anyone knows how to solve this one?</p>
  
  <p>I have checked the connection using github <a href="https://help.github.com/articles/generating-ssh-keys/" rel="nofollow noreferrer">instructions</a> and it seems fine:</p>
  
  <pre><code>ssh -T git@github.com
  Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
  Enter passphrase for key '/home/jverstrynge/.ssh/id_rsa': 
  Hi JVerstry! You've successfully authenticated, but GitHub does not provide shell access.
  jverstrynge@devjverstrynge:/home/httpd$ 
  </code></pre>