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 abc@oldemail.com.
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 git@github.com
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.