97

This question seems like a duplicate but it's really not. Just a slight difference that keeps on repeating. git keeps on telling me: "please tell me who you are", even after setting it up. when I run git commit, this is what I get....

$ git commit

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"

git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'Obby@ObbyWorkstation.(none)')

But when I run git config --global -l, it gives me all my details...

$ git config --global -l
user.name=myname
user.mail=me.myself@gmail.com
http.proxy=proxy.XX.XX.XX:XXXX

I have changed my name, email and proxy but they are appearing fine when I run the command, even in the .gitconfig file I can see the values are set. what could be the missing thing, because I cannot commit at all. Every time it keeps asking me who I am ?

@sheu told me something that i changed, but still the same problem. when i set --local, still git commit asks me the same question. this is the output

$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
user.name=myname
user.mail=me.myself@gmail.com
boatcoder
  • 17,525
  • 18
  • 114
  • 178
Obby
  • 1,353
  • 2
  • 13
  • 20
  • Perhaps this post may be answer to your question http://stackoverflow.com/questions/2936652/git-push-wont-do-anything-everything-up-to-date – Sumit Munot Feb 02 '13 at 13:52
  • @SumitMunot, i couldn't find something useful...i have only the master branch and no other – Obby Feb 02 '13 at 14:03
  • 3
    @SumitMunot when suggesting edits, please refrain from adding stuff like "Please Help" and "Thanks in advance". Phrases like that are discouraged as they add unnecessary noise to the question. Also, you are actively changing titles to questions, but are missing the verb "Is" in many cases. Please make sure that you are using proper grammar when suggesting edits. – psubsee2003 Feb 02 '13 at 14:03
  • 5
    Shouldn’t it be `user.email` in the global configuration (note the **e** in email)? – Lumen Feb 02 '13 at 14:04

5 Answers5

186

That’s a typo. You’ve accidently set user.mail with no e in email. Fix it by setting user.email in the global configuration with

git config --global user.email "you@example.com"
Lumen
  • 3,554
  • 2
  • 20
  • 33
10

You're setting the global git options, but the local checkout possibly has overrides set. Try setting them again with git config --local <setting> <value>. You can look at the .git/config file in your local checkout to see what local settings the checkout has defined.

sheu
  • 5,653
  • 17
  • 32
  • You can erase your git data in control panel: Control Panel → User Accounts → Credential Manager→ Windows Credential Manager. Then re-enter it with the correct username and password. This the only option that worked for me. – Sophie Cooperman Dec 11 '18 at 09:05
5

Do you have a local user.name or user.email that's overriding the global one?

git config --list --global | grep user
  user.name=YOUR NAME
  user.email=YOUR@EMAIL
git config --list --local | grep user
  user.name=YOUR NAME
  user.email=

If so, remove them

git config --unset --local user.name
git config --unset --local user.email

The local settings are per-clone, so you'll have to unset the local user.name and user.email for each of the repos on your machine.

Nate
  • 12,963
  • 4
  • 59
  • 80
0

I had this problem even after setting the config properly. git config

My scenario was issuing git command through supervisor (in Linux). On further debugging, supervisor was not reading the git config from home folder. Hence, I had to set the environment HOME variable in the supervisor config so that it can locate the git config correctly. It's strange that supervisor was not able to locate the git config just from the username configured in supervisor's config (/etc/supervisor/conf.d).

cmp
  • 35
  • 6
0

I had the same problem and for the point, I did not create the typo of "e" in the "email".

I have not given any name to my GitHub account.

I created the GitHub account and used it for around 4 to 5 years by using the drag & drop method for creating and adding files to the repo.

If you have not added name or email to your GitHub account, try to add the name or email whichever is missing.