On Mac, if you have multiple GitHub logins and are not using SSH, force the correct login by using:
git remote set-url origin https://[email protected]/username/repo-name.git
This also works if you're having issues pushing to a private repository.