Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to auto-detect email address

I'm new to SmartGit. I can't commit through my repository, the message I'm receiving is:

Unable to auto-detect email address (got 'Arreane@Arreane-PC.(none)')  *** 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 

I'm using a different PC, but if I commit at home it commits and pushes perfectly, I don't know if this was the cause of the problem.

I've searched around and others say to edit the .git/config file, but I cannot find this file.

What am I missing?

like image 508
Arreane Diez Coyoca Avatar asked May 08 '13 06:05

Arreane Diez Coyoca


People also ask

How do you omit a global to set the identity only in this repository?

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.” Code Answer.


2 Answers

Well, the message is pretty much self-explanatory. You did not tell git what your name and email address is.

Open a command line and type:

git config --global user.email "[email protected]" git config --global user.name "Your Name" 

Of course you should enter your real name and email. Afterwards git knows who you are and is able to insert this information in your commits.

Seems like smartgit does not add the git binary to your path. You have to add its path to the PATH environment variable or first change to the corresponding directory. You can find a screencast here: http://blog.dragndream.com/?p=97

like image 188
michas Avatar answered Oct 08 '22 20:10

michas


If you are using sourcetree: Repository -> Repository Settings --> Advanced --> uncheck "Use global user settings" box

worked great for me.

like image 45
DoronK Avatar answered Oct 08 '22 20:10

DoronK