Change username Github "You must verify your email address" 403 error on git push

Viewed 6311

enter image description here

I recently changed my username on github (so that everything redirects to a new URL on my username)

I got this error through a cmd line git push

enter image description here

You must verify your email address

Fatal: The request URL returned error: 403

However, github wouldn't let me resend email verification under account > settings

I also did the following, per githubs guidelines on username change

git remote set-url origin https://github.com/myNewUserName/repo-name

on all my new repos. Then I ensured I had the emails set correctly on my .git/config file

git config --global user.email "myGithubEmail@gmail.com"

Still could not fix problem

6 Answers

For OSX had to access keychain app and delete the key associated with github.

They key had a '@' symbol.

The problem for me was that I cloned the repo originally over HTTPS and had 2FA enabled. Once I set the remote URL to SSH, then it all worked fine!

git remote set-url origin git@github.com:user/repo-name.git

The key point is to know which account to handle.

Firstly, you shall check the email .

git config user.email

You got the email, then verify it .

The Github helper is in detail Verifying your email address

Login Github account according to the email , Settings -> Emails -> Send verification email,

enter image description here All you need to do is to check Github's link in your mailbox.

I was experiencing this error, and the following solved my issue:

ssh-add -D && ssh-add

For me, on osx, I had to delete the github keys and passwords using the Keychain Access tool. However, at first this didn't work, it just wasn't deleting the keys, it was just freezing up.

I think what fixed that for me, I had to open XCode which had some additional tools to install, then after that I closed XCode and was able to delete the github keys and passwords.

Related