13

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?

Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
Chris Kessel
  • 5,583
  • 4
  • 36
  • 55

1 Answers1

24

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"
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    Well, it wasn't the global configuratoins, but one of the links guided me to look at the local git configuration for my project ("config" under the .git directory). I added a [user] section to that local config and now my name is showing up correctly on the commits. – Chris Kessel Mar 05 '12 at 02:42
  • 1
    @ChrisKessel: Excellent. Did you have a global config with a `[user]` section in it before? – VonC Mar 05 '12 at 08:43
  • Yes, the global config has the [user] section with name and email. I just copied that into the repository's "config" file. I don't know why my global settings weren't being picked up on commit to GitHub. – Chris Kessel Mar 05 '12 at 16:02
  • @ChrisKessel: that was what I was asking myself. – VonC Mar 05 '12 at 16:14