Unable to auto-detect email address
Asked Answered
L

17

83

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?

Lownecked answered 8/5, 2013 at 6:21 Comment(0)
C
104

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

Calisaya answered 8/5, 2013 at 6:29 Comment(4)
thank you for the reply, it says git is not recognized as as internal or external command however, I managed to find a solution I edited my .config file in c:/users/my_name/.gitconfig and added [user] name = my name email = [email protected]Lownecked
It sounds like you need to find where the smartgit menu option is to set your username, and that smartgit is hiding git itself, leaving you in the difficult situation you listed.Marinelli
Seems like git is not in your path. You have to change to the right directory first: blog.dragndream.com/?p=97Calisaya
@ArreaneDiezCoyoca use Git Bash app. It resembles like a CMD in Windows but features all GIT command lines. Install first GIT and then right-click on the master repo and choose Git Bash. Try entering it.Clouet
B
23

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

worked great for me.

Berky answered 13/8, 2013 at 6:53 Comment(0)
S
21

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 "[email protected]"
git config --global user.name "YOUR NAME"
Synapse answered 23/9, 2015 at 22:43 Comment(0)
D
11

Just type like "correct" case

"wrong"

git config --global mike.email "[email protected]"
git config --global mike.name  "mike"

"correct"

git config --global user.email "[email protected]"    
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.

Disrespect answered 13/11, 2017 at 13:40 Comment(0)
D
6

Try the following steps,

  1. Open command prompt and then run
  2. git config --global user.email "[email protected]" // put your email address press enter
  3. git config --global user.name "YOUR NAME" // put your name
Disenable answered 12/1, 2019 at 6:8 Comment(1)
Welcome to Stack Overflow. Please read the other answers before posting your own. This answer has already been given many times, e.g. this one. Parotting other answers without adding anything of value does not help anybody.Cajun
B
2

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.

Blackthorn answered 14/1, 2015 at 11:17 Comment(0)
M
2

it's pretty simple but tricky at the first time.
For example:
If my email is [email protected] type:

git config --global user.email [email protected]

OR

If my username is mrsuicidesheep type:

git config user.name mrsuicidesheep
Moue answered 22/5, 2017 at 9:30 Comment(0)
D
1

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).

Duty answered 12/12, 2013 at 11:39 Comment(0)
P
1

Put your computer's username

git config --global user.email "[email protected]"
git config --global user.name "YOUR COMPUTER\'S USERNAME"
Piccalilli answered 28/5, 2020 at 7:25 Comment(0)
L
1

Ran the sample of these commands:

git config --global user.email "[email protected]"

git config --global user.name "focus1"

Footnote:

[email protected] === email address used to login to your github account.

focus === your github username

Loftus answered 2/11, 2020 at 9:37 Comment(0)
S
0

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.

Scabby answered 6/9, 2018 at 8:18 Comment(0)
A
0

open your git command line

put

git config --global user.email "[email protected]"

this command on command line and change email address put your own email which those use creating accout for github

hit enter

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

use your own name insted of your name

hit enter

its work...

Anaplasty answered 10/7, 2020 at 3:53 Comment(0)
V
0

In SmartGit, open the preferences, page Git Config, and provide your email and name there.

Veach answered 14/9, 2023 at 13:41 Comment(0)
D
-1
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.

Divertissement answered 19/6, 2018 at 17:48 Comment(0)
E
-1

Be sure to open the cmd and not a comment line on the folder you are working on!

For windows I fixed it by opening the cmd from the windows start menu (the windows button) instead of using the command line on the folder that I was I tried

Escalate answered 28/6, 2022 at 20:10 Comment(0)
B
-1

I just installed VSCode on another computer and, I got the same error as yours.

You have to install the GitHub extension and log in to your account on the VSCode.enter image description here

Biofeedback answered 9/12, 2022 at 10:25 Comment(0)
M
-4

Make sure that you opened git as admin or root.

Martensite answered 20/12, 2017 at 4:49 Comment(2)
This is an interesting problem. If you work on the workspace with only root privileges, than you need git configurations for root user. Otherwise it isn't needed.Glynis
The better way would be for you work on local workspace without root privileges and if you need the changes on public space than you can push from local workspace to public webspace with write permissions for root and read permissions for viewers.Glynis

© 2022 - 2024 — McMap. All rights reserved.