title: Git remote push not working, SSH key issues
body: <p>I have an Amazon EC2 webserver that I'm trying to push to.  Its SSH connections are authenticated with a key with no password.  I have set up my local machine's ssh config file like so</p>
  
  <pre><code>Host web                                                                        
  Hostname &lt;path to host&gt;                                                           
  User ubuntu                                                                     
  IdentityFile &lt;path to key&gt;                                   
  IdentitiesOnly yes
  </code></pre>
  
  <p>and when I do</p>
  
  <pre><code>ssh web
  </code></pre>
  
  <p>I log in just fine, but when I try to do</p>
  
  <pre><code>git push web
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Permission denied (publickey).
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>on the local macine and </p>
  
  <pre><code>Connection closed by &lt;local machine's IP&gt; [preauth]
  </code></pre>
  
  <p>In the ssh auth.log file on the server.  I've been over and over the SSH and git files on both the server and local, and I just can't get it.  What could I be missing?</p>
  
  <p>.git config on local is</p>
  
  <pre><code>[core]                                                                          
      repositoryformatversion = 0                                             
      filemode = true                                                         
      bare = false                                                            
      logallrefupdates = true                                                 
  [remote "origin"]                                                               
      url = https://&lt;bitbucketpath&gt;.git    
      fetch = +refs/heads/*:refs/remotes/origin/*                             
  [branch "master"]                                                               
      remote = origin                                                         
      merge = refs/heads/master                                                 
  [remote "web"]                                                                  
      url = ubuntu@&lt;server ip&gt;:/home/ubuntu/git/test.git                  
      fetch = +refs/heads/*:refs/remotes/web/*         
  </code></pre>
  
  <p>the repo is owned by ubuntu, which is the user that would be logging in via ssh as specified in the config.</p>