更改用户名Github“您必须验证您的电子邮件地址” git push上的403错误 [英] Change username Github "You must verify your email address" 403 error on git push
问题描述
我最近在github上更改了用户名(以便所有内容都重定向到用户名上的新URL)
I recently changed my username on github (so that everything redirects to a new URL on my username)
我通过cmd行 git push
您必须验证您的电子邮件地址
You must verify your email address
致命:请求URL返回错误:403
Fatal: The request URL returned error: 403
但是,github不允许我在帐户>下重新发送电子邮件验证设置
However, github wouldn't let me resend email verification under account > settings
根据githubs用户名更改指南,我还做了以下操作
I also did the following, per githubs guidelines on username change
git remote set-url origin https:/ /github.com/myNewUserName/repo-name
在我所有的新存储库上。然后,我确保在.git / config文件中正确设置了电子邮件
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
仍然无法解决问题
推荐答案
解决方案:最终联系github支持
SOLUTION: I ended up contacting github support
Github支持说要使用此命令
Github support said to use this command
git config --global --unset credential.helper
,以便在发送 git时可以重新输入帐户信息推
这没有用,所以我不得不去
This didn't work so I had to go to
控制面板
→用户帐户
→凭据管理器
→ Windows凭据管理器
→删除与github关联的文件
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
每个github,原因如下:
Per github, the reasons are as follows:
如果要保持启用此功能(阻止cmd行公开电子邮件),您将需要重新编写此存储库的Git历史记录,以从每次提交的作者信息中删除您的私人电子邮件地址。或者,您也可以关闭此功能。
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.
此处的替代解决方案
< a href = https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/ rel = nofollow noreferrer> https:// help。 github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
https://help.github.com/articles/changing-author-info
此处的设置信息
https://github.com/settings/emails
希望这有助于在更改github用户名时帮助某人
hopefully this helps out someone when changing their github username
这篇关于更改用户名Github“您必须验证您的电子邮件地址” git push上的403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!