为什么我的GitHub提交始终显示为未知作者? [英] Why do my GitHub commits always show as unknown author?

查看:509
本文介绍了为什么我的GitHub提交始终显示为未知作者?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚建立了一个GitHub帐户并推送了一个初始存储库。如果我看一下帐户级别,在公共活动下,这是正确的,并说 chriskessel推... ....



如果我点击仓库,它说:未知创作4分钟前



我不能弄清楚如何配置IntelliJ(或任何底层的Git文件)以在实际提交行中获取我的名字。 git config user.name 在项目的命令行中知道我是谁。



我正在使用IntelliJ 11,Git 1.7.9和Windows 7。

我很困惑,特别是因为GitHub帐户知道谁做了什么,但不是GitHub存储库和所有我的提交,甚至是存储库的创建都是通过IntelliJ。任何想法要看什么?

解决方案

仔细检查您的 user.email 设置。

必须为GitHub设置 user.name user.email 拿起正确的作者。



作为一个例子,请参阅 Git作者未知问题。

另见博客文章 GitHub:将代码提交到您的公共存储库中,而提交时不提供未知作者名称

GitHub手册页


Git通过检查用户的姓名和电子邮件来跟踪每个提交人。

此外,我们使用此信息将您的提交您的GitHub帐户。

设置th请输入下面的代码,用您自己的名称和电子邮件替换。该名称应该是您的实际名称,而不是您的GitHub用户名。




  $ git config  - 全球用户名名字姓氏
$ git config --global user.emailyour_email@youremail.com


I've just set up a GitHub account and pushed an initial repository. If I look at the account level, under "Public Activity" it's correct and says chriskessel pushed .....

If I click on the repository though, it says: unknown authored 4 minutes ago

I can't figure out how to configure IntelliJ (or whatever underlying Git file) to get my name in the actual commit line. git config user.name at the command line in the project knows who I am correctly.

I'm using IntelliJ 11, Git 1.7.9, and Windows 7.

I'm rather puzzled, especially since the GitHub account knows who did things, but not the GitHub repository and all my commits and even the repository creation were through IntelliJ. Any ideas what to look at?

解决方案

Double check your user.email setting.
Both user.name and user.email must be set for GitHub to pick up the right Author.

As an example, see the "Git author Unknown" question.
See also the blog post "GitHub: Committing code to your public repository without "Unknown" author name in commits".

From the GitHub man page:

Git tracks who makes each commit by checking the user’s name and email.
In addition, we use this info to associate your commits with your GitHub account.
To set these, enter the code below, replacing the name and email with your own. The name should be your actual name, not your GitHub username.

$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "your_email@youremail.com"

这篇关于为什么我的GitHub提交始终显示为未知作者?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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