问题
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
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
回答1:
SOLUTION: I ended up contacting github support
Github support said to use this command
git config --global --unset credential.helper
so that I could re-enter my account information when sending git push
This didn't work so I had to go to
Control Panel
→ User Accounts
→ Credential Manager
→ Windows Credential Manager
→ Delete the one associated with github
Since my repos were committed under my old-username, there were conflicts using my new-username, despite the fact I had no email changes.
I had to disable "Block-command line pushes that expose your personal email address" as one potential solution. I have a dedicated email when sending commits so this is not a problem for me
Per github, the reasons are as follows:
If you want to keep this feature enabled (block cmd line expose email), you'll need to re-write the Git history of this repository to remove your private email address from the author info for each commit. Alternatively you can turn off this feature.
Alternate solutions here
https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
https://help.github.com/articles/changing-author-info
Settings information here
https://github.com/settings/emails
hopefully this helps out someone when changing their github username
回答2:
For OSX had to access keychain app and delete the key associated with github.
They key had a '@' symbol.
回答3:
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,
All you need to do is to check Github's link in your mailbox.
回答4:
I was experiencing this error, and the following solved my issue:
ssh-add -D && ssh-add
来源:https://stackoverflow.com/questions/45551143/change-username-github-you-must-verify-your-email-address-403-error-on-git-pus