Gitlab SSH Keys

I’ve spent the last couple of hours racking my brains to try and figure out why I couldn’t get SSH login working with my GitLab installation. In the end, I wasn’t generating the ssh keys properly.
I was just using
ssh-keygen -t rsa
and then trying to login with
macbook-jm:~ user1$ ssh git@git.mydomain.com
My key was never being used because the key was generated with a user of user1.
The fix was simple, generate the key as follows:
ssh-keygen -t rsa -C git@git.mydomain.com
And now it all works!

Leave a Comment

Your email address will not be published. Required fields are marked *