Git configuration user.name doesn’t work

You’re not using the correct syntax: there shouldn’t be any equal sign between user.name and "My name", or between user.email and "[email protected]". For instance, when you run

git config --global user.name = "My Name"

the command interprets the = character as the string value passed to the user.name key, and the rest of the line ("My Name") is silently ignored. That’s why your .gitconfig file ends up containing

[user]
    name = =
    email = =

Everything should work if you use the correct syntax:

enter image description here

See also VonC’s answer about relevant changes in Git 2.13.

Leave a Comment