Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not push into github because of email verification

Tags:

git

github

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
like image 968
Esteban Arocha Ortuño Avatar asked Jan 25 '26 00:01

Esteban Arocha Ortuño


1 Answers

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.

like image 100
VonC Avatar answered Jan 27 '26 12:01

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!