The name and email address are set in the Git config file for each user, however Git still uses the name, default and email address
The title says it, but I'll explain it in more detail:
I configured my username and email address as recommended using the commands:
git config --global user.name
git config --global user.email
I can verify that this is installed by executing git config --global --list
and I get the following output:
core.user=Joshua Guerra
core.email=joshua@allianceconsults.net
core.editor=nano
push.default=simple
I can also verify this by running cat ~/.gitconfig
where the output is:
# This is Git per-user configuration file.
[core]
# Please adapt and uncomment the following lines:
user = Joshua Guerra
email = joshua@allianceconsults.net
[core]
editor = nano
[push]
default = simple
So, I have verified that it is installed correctly. However, I still get the message when I commit, which 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 you@example.com
And before you say it only sets the values of future commits, please understand that I understand that. Also, I installed this and was repeatedly getting the message that the values were NOT set even after I set them and checked every time they were set when I post something to accomplish something.
I don't understand why my system keeps giving me this message. If you need more information on which version and system I'm on, I'm happy to provide it upon request.
source to share
Settings name
and email
should appear in the section [user]
~/.gitconfig
. They are not installed correctly. Yours ~/.gitconfig
could result from executing commands:
git config --global core.user "Joshua Guerra"
git config --global core.email joshua@allianceconsults.net
The commands that should have been run:
git config --global user.name "Joshua Guerra"
git config --global user.email joshua@allianceconsults.net
To check if the settings are correct, run git config --global --list
and check the output for:
... user.name=Joshua Guerra user.email=joshua@allianceconsults.net ...
source to share