10

The title says it, but I will explain it more thoroughly:

I have configured my user's name and email as recommended using the commands:

git config --global user.name git config --global user.email 

I can verify that this is set by doing git config --global --list and I get the following output:

core.user=Joshua Guerra [email protected] core.editor=nano push.default=simple 

I can also verify it by doing cat ~/.gitconfig, where the output is:

# This is Git's per-user configuration file. [core] # Please adapt and uncomment the following lines: user = Joshua Guerra email = [email protected] [core] editor = nano [push] default = simple 

So, I have verified that it is set properly. However I still get a message when I commit that says:

Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email [email protected] 

And before you say, this only sets the values for future commits, understand that I understand that. Also, I have set this and repeatedly gotten the message that the values were NOT set even AFTER I set them and verified each time that they were set when I go to commit something.

I'm at a loss for why my system keeps giving me this message. If you need more info about what version and system I am on, I am happy to provide it upon request.

1
  • 1
    I think this question to how setup per-project gitconfigs may be related here. Commented May 17, 2022 at 14:28

1 Answer 1

28

The name and email settings should appear in the [user] section of ~/.gitconfig. They are not set correctly. Your ~/.gitconfig could have resulted from running the commands:

git config --global core.user "Joshua Guerra" git config --global core.email [email protected] 

The commands that should have been run are:

git config --global user.name "Joshua Guerra" git config --global user.email [email protected] 

To verify that the settings are correct, run git config --global --list and check the output for:

... user.name=Joshua Guerra [email protected] ... 
Sign up to request clarification or add additional context in comments.

1 Comment

I see that I did not read what I did as carefully as I thought. sigh. Thanks for your help

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.