Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Git is not allowing me to commit even after configuration?

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 "[email protected]"  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 [email protected] 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 [email protected] 
like image 555
Obby Avatar asked Feb 02 '13 13:02

Obby


People also ask

Why git config is not working?

Try opening it and see do this file look like this. Try setting global config through command line by- git config --global user. email "[email protected]" It automatically set the . gitconfig in the directory it needed.

How do I commit in git?

To add a Git commit message to your commit, you will use the git commit command followed by the -m flag and then your message in quotes. Adding a Git commit message should look something like this: git commit -m “Add an anchor for the trial end sectionnn.”

How do I configure git?

If you want to check your configuration settings, you can use the git config --list command to list all the settings Git can find at that point: $ git config --list user.name=John Doe user. [email protected] color. status=auto color.


1 Answers

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 "[email protected]" 
like image 80
Lumen Avatar answered Oct 14 '22 22:10

Lumen