Git提交没有与我的GitHub帐户链接 [英] Git commits are not getting linked with my GitHub account

查看:316
本文介绍了Git提交没有与我的GitHub帐户链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试将我的提交链接到我的GitHub帐户时遇到问题。我的照片显示在GitHub上正在提交提交。值 user.name user.email 是正确的,还有其他想法可以检查吗?



解决方案

即使您的设置看起来正确,但此错误意味着 user.email 字段中的内容是不正确的,这给了Github关于提交者是谁的错误信息。一个小小的错字可能会把整件事情都扔掉。第一步,运行 git config -l <​​/ p>

code>来检查你的设置,并确保你没有意外的东西在那里。运行 git log 并记下 Author 字段的外观。它的格式应该是 Author:Your-Name< your-github-email@example.com> 。对于Github而言,括号内的部分是非常重要的部分。

第二,如果你以前能够成功提交某些内容,请打开该回购并运行 git log 来找到一切正常工作的提交。检查作者字段与不工作的字段,看看是否有差异。



第三,如果存在差异,请切换回问题并运行 git config --global user.email correct-email@example.com



如果问题仍然存在,请检查您的Github 电子邮件设置,并确保您使用的电子邮件地址已添加到您的帐户中。



请参阅本帮助文章获取更多信息。


I'm having problems trying to link my commits to my GitHub account. Commits are being reported on GitHub the way my picture shows. The values user.name and user.email are correct, any other ideas to check?

Thanks in advance

解决方案

Even though your settings might look correct, this error implies that something in the user.email field is incorrect, which gives Github the wrong information about who the committer is. A small typo could throw the whole thing off. The fix is in the third step, and the first two steps help identify what the problem is.

First, run git config -l to check your settings and make sure that you don't have something unexpected in there. Run git log and take note of how the Author field looks. It should be in the format of Author: Your-Name <your-github-email@example.com>. The part within the brackets is the important part as far as Github is concerned.

Second, if you've been able to commit something successfully in the past, open that repo and run git log to find the commit where everything worked properly. Check that Author field against the one that isn't working and see if there is a difference.

Third, if there is a difference, switch back to the repo at issue and run git config --global user.email correct-email@example.com.

If the problem persists, check your Github email settings and make sure that the email address that you are using is added to your account.

See this help article for more information.

这篇关于Git提交没有与我的GitHub帐户链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆