Unable to auto-detect email address

回眸只為那壹抹淺笑 提交于 2019-12-02 17:49:46

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 "you@example.com"
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

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

worked great for me.

You can solve the problem with the global solution, but firstly I want to describe the solution for each project individually, cause of trustfully compatibility with most of Git clients and other implemented Git environments:

  • Individual Solution

Go to the following location:

Local/repo/location/.git/

open "config" file there, and set your parameters like the example (add to the end of the file):

[user]
    name = YOUR-NAME
    email = YOUR-EMAIL-ADDRESS
  • Global Solution

Open a command line and type:

git config --global user.email "YOU@EXAMPLE.COM"
git config --global user.name "YOUR NAME"

Just type like "correct" case

"wrong"

git config --global mike.email "mike@gmail.com"
git config --global mike.name  "mike"

"correct"

git config --global user.email "mike@gmail.com"    
git config --global user.name "mike"

user.name is your account name in git-hub user.email is your email when you sign in git-hub.

Aashutosh Taikar

it's pretty simple but tricky at the first time.
For example:
If my email is mrsuicidesheep@gmail.com type:

git config --global user.email mrsuicidesheep@gmail.com

OR

If my username is mrsuicidesheep type:

git config user.name mrsuicidesheep
Suraj Verma

Try the following steps,

  1. Open command prompt and then run
  2. git config --global user.email "YOU@EXAMPLE.COM" // put your email address press enter
  3. git config --global user.name "YOUR NAME" // put your name

This problem has very simple solution. Just open your SmartGit, then go to Repository option(On top left), then go to settings. It will open a dialog box of Repository Settings. Now, click on Commit TAB and write your UserName and EmailId which you give on BitBucke website. Now click ok and again try to Commit and it works fine now.

Bryan Jiencke

With SmartGit, you can also edit them by going to Project > Repository settings and hitting the "Commit" tab (make sure to have "Remember as default" selected).

In case you're using git, use the right email address you used for github registration and then your computer name. this worked for me.

Taofeek Olalekan
git config --global user.email "put your email address here" # user.email will still be there  
git config --global user.name "put your github username here" # user.name will still be there

Note: it might prompt you to enter your git username and password. This works fine for me.

Make sure that you opened git as admin or root.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!