title: ssh connection failing when pushing on a Gitlab repo
body: <p>I have installed <a href="http://gitlab.org/" rel="nofollow">GitLab</a>.  Suppose I installed it in <code>/home/myuser/gitlab</code>.</p>
  
  <ol>
  <li>I created a new project</li>
  <li>I was told to create a repo "test" I put in <code>/home/myuser/gitlab/test</code></li>
  <li>I added some SSH key in <code>/home/myuser/.ssh</code></li>
  <li>Then I initialized a Git repo in <code>/home/myuser/gitlab/test</code>.</li>
  <li>Following instructions, I added a remote <code>git@localhost:root/testing.git</code>
  but when I try to push, I get this error message:</li>
  </ol>
  
  <pre class="lang-none prettyprint-override"><code>$ git push -u origin master
  ssh: connect to host localhost port 22: Connection refused
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>I installed GitLab in OS X and I have other SSH keys in <code>/home/myhome/.ssh</code>, I have set up the user email and name inside <code>/home/myuser/gitlab/.git/config</code>, (and set those globally just for testing) and the server is launched from <code>/home/myuser/gitlab</code>. Does anybody have an idea where this error comes from?</p>
  
  <p>If I run <code>ssh git@localhost</code>, I get</p>
  
  <pre class="lang-none prettyprint-override"><code>/home/myhome/.ssh/config line 4: garbage at end of line; "home".
  </code></pre>
  
  <p>where in this file I have some settings for a remote server for another project. I think it is the problem but I don't really know how to fix it.</p>
  
  <p>Update : Here's the content of my <code>~/.git/config</code> file</p>
  
  <pre><code>Host remote_test_server
  Hostname remote_test_user@ftp.remote_test_server
  IdentityFile ~/.ssh/id_rsa_stf.pub
  User &lt;your home acct&gt;
  </code></pre>