I have two Github accounts: private and for work. Each associated with different credentials. Let's name these credentials PRIVATE and WORK.
Currently, my system seems to be using the work-related credentials WORK. When I tried to delete/change these credentials and push to my private repo, I still get:
git push --set-upstream origin main
ERROR: Permission to my_private_repo denied to WORK.
fatal: Could not read from remote repository.
I'm using Mac, deleted all git-related items from Keychain. When I do
git credential-osxkeychain erase
host=github.com
protocol=https
the terminal hangs.
Can you please tell me how to completely remove the WORK credentials from the computer?