I can't push to a new repository of github, the terminal prompts this message:
ERROR: You must verify your email address.
See https://github.com/settings/emails.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The email is verified on that section of github and it is the same that this commands return:
git config user.email
git config --global user.email
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 ([email protected] or ssh://[email protected])... 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With