If you are getting an error like this when pushing, the reason might be having two GitHub accounts on your device. You need to remove the unnecessary one. Search for "Credential Manager" and find it.
Then click on the Windows credentials tab, locate this tab, and press the remove button. Your problem should be solved. (Now when pushing, you will need to log in with the account you want.)
Then click on the Windows credentials tab, locate this tab, and press the remove button. Your problem should be solved. (Now when pushing, you will need to log in with the account you want.)