Page 1 of 1

github: permission denid

Posted: Wed Mar 06, 2024 9:58 pm
by peter_b
[PROBLEM]
Trying to "git push" to a repository of mine on github.com:
ERROR: Permission to USER1/repository.git denied to USER2.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Seems there's a mixup between which USER (1 or 2) I'm authenticating as...
I'm using ssh.

[SOLUTION]

I've accidentally had my SSH key assigned to USER2 (in github's user-account > settings > SSH keys), and not for USER1.
Check which SSH keys you have assigned to which account *on github.com* - and adjust the access conditions/rights accordingly.