top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Getting git commit error: "fatal: empty ident name ... not allowed"

+1 vote
3,404 views

In git version 1.8.2.3 (in arch) I'm getting this message when doing git commit -a

fatal: empty ident name (for ) not allowed

I get this message in a brand new repository. I'm getting the same message in Ubuntu 12.10 which has 1.8.1.2

The message suggests I do

Run

 git config --global user.email "you@example.com"
 git config --global user.name "Your Name"    to set your account's default identity.

but I've done this

[tim@newton git_scratchpad]$ git config -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true

git works as I expect on another machine with 1.7.9. I'm at my wits end and I don't know what to do.

posted May 21, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

It doesn't look like you've done

git config user.email "..."
git config user.name "..."

in a way that Git can find for *this* repository, or else Git doesn't like the values that you gave.

From the manual page, it looks like "git config -l" will list only variables set in this .git/config file. To see your global configuration values, you need to do "git config -l --global". But in some situations, Git will use your Unix user identity/e-mail for these values. My guess from these messages is that the e-mail that Git can find for you is "tim@newton", and Git knows that "newton" can't be your full e-mail and is choking on it.

answer May 22, 2013 by anonymous
Similar Questions
+2 votes

I am getting this there while updating Sub module in my main project

+2 votes

When does git shows message "nothing added to commit but untracked files present " ?

+2 votes

In coreboot we try to check for whitespace errors before committing. Of course a pre-commit hook is the way to go, but unfortunately it is not so simple (at least for me) as the following requirements exist.

  1. Only the files actually committed should be checked. That means running git commit -a, abort that and then running git commit some/file should only check some/file for whitespace errors.

  2. There are certain files that are allowed to have whitespace errors. In our case these are *.patch and *.diff files which by design seem to contain whitespace error.

Currently the whole tree is checked, which takes a lot of time. I tried to come up with a patch, but failed so far. Best would be to have

$ git diff --check --only-committed-files --exclude "*patch$"

where I could not find a way for the last to switches.

Currently, I would use

$ git diff-index --cached --name-only $against -- | grep -v patch$

and pass that list to some whitespace check program. Unfortunately that still does not fulfill the first requirement. What am I missing to solve this elegantly?

+1 vote

I did a series of commits and now I find one of my commit (not the topmost one) has an incorrect commit message. How can I change that specific one? I believe "git commit --amend" works only for the last commit.

0 votes

I am working CGI project using C programming and I am reading the login detail in form input fields and when I try to submit the form with empty fields it gives me 502 Bad Gateway CGI was not in CGI/1.1 complaint.note that i am redirecting to the same page I am reading the the fields.


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...