title: GitLab SSH-Cloning fails; HTTP works
body: <p>overflow! Since I am new here and decided to ask a question myself for the first time I hope that I am asking accordingly to the guidelines. Please point out any mistakes.</p>
  
  <p><a href="https://stackoverflow.com/questions/17739978/cant-clone-gitlabs-repo-via-ssh-via-http-ok">Can&#39;t clone gitlab&#39;s repo via ssh, via http - OK</a></p>
  
  <p>My problem is very similar to that one, but I want to make sure I do not have any simple error in my configuration that might cause it.</p>
  
  <p>My setup is Ubuntu 12.10 and GitLab 6.0.2</p>
  
  <p>I used the following guide: <a href="https://www.digitalocean.com/community/articles/how-to-set-up-gitlab-as-your-very-own-private-github-clone" rel="nofollow noreferrer">https://www.digitalocean.com/community/articles/how-to-set-up-gitlab-as-your-very-own-private-github-clone</a></p>
  
  <p>HTTP cloning works perfectly, but using SSH SmartGit loads forever ("Checking connection to repository") until a message pops up "Waiting for the following process to finish: git.exe ls-remote git@git.server.com:groupname/projectname.git refs/heads/*"</p>
  
  <blockquote>
    <p>/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production</p>
  </blockquote>
  
  <p>says everything is alright:</p>
  
  <pre><code>Checking Environment ...
  
  Git configured for git user? ... yes Has python2? ... yes python2 is supported version? ... yes
  
  Checking Environment ... Finished
  
  Checking GitLab Shell ...
  
  GitLab Shell version &gt;= 1.7.0 ? ... OK (1.7.0) Repo base directory exists? ... yes Repo base directory is a symlink? ... no Repo base owned by git:git? ... yes Repo base access is drwxrws---? ... yes post-receive hook up-to-date? ... yes post-receive hooks in repos are links: ...  groupname / projectname ... ok
  
  Checking GitLab Shell ... Finished
  
  Checking Sidekiq ...
  
  Running? ... yes
  
  Checking Sidekiq ... Finished
  
  Checking GitLab ...
  
  Database config exists? ... yes Database is SQLite ... no All migrations up? ... yes GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Init script exists? ... yes Init script up-to-date? ... yes Projects have satellites? ...  groupname / projectname ... yes Redis version &gt;= 2.0.0? ... yes Your git bin path is "/usr/bin/git" Git version &gt;= 1.7.10 ? ... yes (1.7.10)
  
  Checking GitLab ... Finished
  </code></pre>
  
  <p>Every time I try to login via SSH, auth.log adds:</p>
  
  <pre><code>sshd[processID]: Set /proc/self/oom_score_adj to 0  
  sshd[processID]: Connection from CLIENTIP port xxxx
  </code></pre>
  
  <p>What does the first line mean? The port in the second line seems to vary between 6000 and 8000. Same problem if I disable my firewall. I forwarded port 22 on my router and I try to access the repository via lan.</p>
  
  <p>Using PuTTY I can connect via SSH, login as user "git" with password &amp; key. After login I get a message from gitlab "Welcome to GitLab, Firstname Lastname!" and immediately afterwards "Connection closed by remote host."</p>
  
  <p>I'm stuck at this point. Should I post my sshd.conf? I would really appreciate if you could point me in the right direction.</p>
  
  <p>Thanks for reading!</p>