Reputation: 386
I have a private repo on my gitlab account. I have set up SSH locally and my git global config matched the email and user that I use on gitlab but even so I still get the message Please make sure you have the correct access rights
I have tried both SSH and HTTP based clones, neither worked. Is there anything I'm missing?
I know it's supposed to be simple but I've spent over 30 minutes on this. This is the first time I'm using gitlab though, I've always used github or bitbucket (and never had such problem).
Upvotes: 1
Views: 9567
Reputation: 1323115
You can check if your local key is used with:
ssh -Tv [email protected]
Make sure your SSH URL starts with [email protected]:<me>/<myRepo>
, not <me>@gitlab.com:...
And, as commented, make sure to add your public key to your GitLab account.
If your local SSH key has not a default name (like id_rsa
), you will need a ~/.ssh/config
file, as I detailed here.
Upvotes: 4