Problem faced:
I cannot git push
to my repo, error message:
remote: Permission to fishercoder1534/Leetcode.git denied to MY_OLD_GITHUB_ACCOUNT
fatal: unable to access 'https://github.com/fishercoder1534/Leetcode.git/':
The requested URL returned error: 403`
Research I have done:
- looking at this post, I have all these correctly pointing to my new github account:
git config --global user.name "NewAccountFirstname NewAccountLastname" git config --global user.email "my_new_github_account_email@gmail.com"
- I have deleted my old ssh keys, generated new ssh keys, placed them under ~/.ssh/, also add them into my new Github account.
- I have created a ~/.ssh/config file with the following contents as suggested by the above post:
Host github.com User git IdentityFile ~/.ssh/id_rsa # wherever your "new" key lives IdentitiesOnly yes
- I have run
$ssh -vT git@github.com
which all shows my new Github account info.Hi fishercoder1534! You've successfully authenticated, but GitHub does not provide shell access.
- I have run
$ssh -i ~/.ssh/id_rsa -vT git@github.com
, it's also showing my new Github info, withHi fishercoder1534! You've successfully authenticated, but GitHub does not provide shell access.
What's next option to try/help?