1

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).

Marlon Englemam
  • 351
  • 5
  • 11
  • 1
    Did you add your SSH public key to Gitlab? Locally, have you loaded the private SSH key to your SSH agent? – wyphan Aug 05 '21 at 03:21

1 Answers1

4

You can check if your local key is used with:

ssh -Tv git@gitlab.com

Make sure your SSH URL starts with git@gitlab.com:<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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250