One more option: Check your git config credential.helper
output
If the helper is caching the wrong credentials, it will use the wrong account (with an email still unverified).
Force it to ask you again said credentials with (as explained in "How do I sign out in the Git Bash console?")
git credential-manager reject https://github.com
The next push will force you to enter the right account/password, which would then pass the email verification step, since you mention the account has already verified its email.
On Mac (osxkeychain
) use the git credential-osxkeychain erase
command
printf 'host=github.com\nprotocol=https\n\n' | git credential-osxkeychain erase
But if your URL is already an SSH one (git@github.com
or ssh://git@github.com
)... then credential helpers won't matter.
"changing it to an URL" (possibly HTTPS) and having it work means the right credentials were cached (for HTTPS github.com
URL).
The other option was to rename/save the ~/.ssh/id_rsa(.pub)
files and regenerate SSH keys, associating them with the right account (the one with the verified email).
Then no URL change would be needed.