title: GitLab ssh to hostname with local user causes "fatal: Could not read from remote repository"
body: <p>An odd situation</p>
  
  <p>Using Ubuntu with GitLab 7.0.0</p>
  
  <p>A user (me) has a local account on the server accessed using SSH keys.
  A user same name as above and has an account in GitLab also with the same SSH keys.</p>
  
  <p>My preferred access method is to use SSH when pushing and pulling.</p>
  
  <p>So after creating repository in GitLab and trying</p>
  
  <pre><code>git remote add origin git@[HOST NAME]:[GROUP]/[PROJECT].git
  git push -v -u origin master
  </code></pre>
  
  <p>I got:</p>
  
  <pre><code>fatal: Could not read from remote repository.
  ...
  </code></pre>
  
  <p>There are lots of web pages about this error, did all the checking and seemed ok.</p>
  
  <pre><code>git remote add origin http://[HOST NAME]:[GROUP]/[PROJECT].git
  git push -v -u origin master
  </code></pre>
  
  <p>Worked like a charm ...</p>
  
  <p>Now for other users of GitLab who <strong>DO NOT</strong> have a local account git@[HOST NAME]:[GROUP]/[PROJECT].git works fine.</p>
  
  <p>Now if I do the following: </p>
  
  <pre><code>git remote add origin git@[**IP ADDRESS**]:[GROUP]/[PROJECT].git
  git push -v -u origin master
  </code></pre>
  
  <p>It works fine!</p>
  
  <p>When looking at the auth.log on the machine git@[HOST NAME]</p>
  
  <pre><code>Accepted publickey for [USER]
  </code></pre>
  
  <p>When looking at the auth.log on the machine git@[<strong>IP ADDRESS</strong>]</p>
  
  <pre><code>Accepted publickey for git
  </code></pre>
  
  <p>Any ideas?</p>