Cannot clone via SSH - HTTP works fine!?


I’m having real problems getting my Gitlab CI local install to allow repository cloning via ssh. I can clone via HTTP absolutely fine?

I’ve read all other related posts on the forum and i can’t seem to find a resolution to my problem.

I can see that the physical location of the repository on the disc is: /var/opt/gitlab/git-data/repositories/myrepo.git but the ssh clone path is :/root/myrepo.git. Does gitlab perform some magic on this path somewhere when an ssh connection comes in to route it to the correct path?

I’ve tried hard coding the physical path when cloning over ssh, e.g. This:


… instead of


… and it works fine? I’ve looked through the gitlab.rb file and can’t see anything in there which looks to be of any relevance.

Any help here would be greatly appreciated.

Thank you!

Solved this by removing any pre-existing ssh keys from .ssh/authorized_keys. Looks like i already had my key set up in there previous to installing gitlab. You need to import your key through gitlab for the ssh paths to work correctly.