I was trying to setup a repo with an existing files. So I followed the simple instructions from the source but on the last step when I try to push, I got this error;
remote: Permission to abc/abc.git denied to [email protected].
fatal: unable to access 'https://github.com/abc/abc.git/': The requested URL returned error: 403
So then I checked the current user by outputting the command;
git config user.email
which yields a different email from the error above. Also, tried authenticating into github which went successful with the command below.
ssh -T [email protected]
I only have one ssh-key and ssh-agent is also defined.
Any suggestions on how to further debug? Why is it using the oldemail instead of the current one?
Thanks!
P.S. I'm on a mac running yosemite.
It would appear that you are attempting to connect with an email that GitHub does not recognise/associate with your account.
You can either:
A) Change the email address using git config, https://help.github.com/articles/setting-your-email-in-git/ to the email address associated with your github account.
B) Add the email address returned from the 'git config user.email' here: https://github.com/settings/emails
Also ensure that you do have write access to the repo you are trying to push to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With