In my machine, I usually push code to my personal Github account. There, the username is
jobyjoseph. Today, I created a new account. I was trying to push code to that account using SSH. It was not working because Git for some reasons was detecting
jobyjoseph, not the new account. I tried
git config value updates. That also did not work.
The error looked like this:
ERROR: Permission to backbenchercode/React-Query-Intro.git denied to jobyjoseph. fatal: Could not read from remote repository.
Finally, following steps worked. Take terminal. Then clear the SSH key links using:
Next attach the ssh key of the new account:
Thats it. After these steps, I could push my code to the new account.