How to fix multiple values error in git while configuring the name? - linux

$ git config --global user.name "Amritjyot Singh"
warning: user.name has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change user.name.
How to use regexp to fix this problem?
I tried git config --global user.name "Amritjyot Singh"
Expected to configure my name in git bash but this error was shown

For some reason, you have multiple user.name configuration keys. Remove them all with:
git config --global --unset-all user.name
Then set it again:
git config --global user.name "Your Name"

To see where different values for a config parameter are defined :
$ git config --show-origin --get-all user.name
# sample output:
file:/home/wwhite/.gitconfig Walter White
file:.git/config Heisenberg
If you see several values coming from one single file:
file:/home/jack/.gitconfig Jack
file:/home/jack/.gitconfig Tyler Durden
you can either
edit the mentioned configuration file with a regular text editor, and delete the erroneous value,
or use :
git config [correct scope] --replace-all user.name "My Name"
where [correct scope] will probably be --global (if source is in $HOME/.gitconfig) or --local (<- same as empty string, if source is .git/config).

Run git config --global -e to edit the global config file. According to the warning and error messages, there are multiple values like this
[user]
name = foo
Find all of them, keep one and remove the others.

Related

ubuntu throws this error: error found when loading /home/user/.profile user.name has multiple values, cant access to my laptop

i have an issue about ubuntu, when i try to login to my user, i got this error:
see the screen
the message:
warning: user.name has multiple values error: cannot overwrite multiple values with a single value Use a regexp, --add or --replace-all to change user.name.
i can successfully login to my second user, i tried to reset my git username but doesn't work
can any one help about this problem ?
Hello i have fixed the problem by changing my git username and email :
git config --global --replace-all user.name "mario"
git config --global --replace-all user.email "mario#gmail.com"

erro when I want to run an update on one of these app servers, I get:

*** Please tell me who you are.
Run
git config --global user.email "you#example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'songtrang97#DESKTOP-PTPE1UP.(none)')
Omit --global to set the identity only in this repository

Git asks "please tell me who you are". Unable to auto detect email address?

Console log error :
please tell me who you are
I run this:
git config _ _global user.email"you#example.com"
git config _ _global user.email"you#example.com"
to set. your accounts default identity.
Omit _ _ global to set the identity only in this repository.
Try this :
git config --global user.name "John Doe" // config name, don't for your question
git config --global user.email johndoe#example.com
Use --global insteal of _ _global
Check Getting Started - First-Time Git Setup
If you want set for just that repository, you should modify .git/config.
--global set global config, not just one repository.

Is there a way to configure my identity from inside Git-Gui, instead of Git-CMD?

Is there a way to configure my identity from inside Git-Gui, instead of having to go through Git-CMD?
I know how to do it through CMD, as it literally tells you. I'm just wondering if I need to use the CMD.
When I tried to merge something with the GUI for the first time, it's asking me to run:
git config --global user.email johndoe#example.com
git config --global user.name "John Doe"
Yes, at least on version 0.21 you can do it by opening a git repository folder then going to Edit->Option, then edit your user name and email address in the GUI.

fatal: bad config file line 1 in /home/trx/.gitconfig

I know this question has been asked a million times, but my ~/.gitconfig consists of only two lines, that are character correct with the tutorial.
git config --global user.name "trx"
git config --global user.email chazx#live.com
What could be the issue here?
This is my ~/.gitconfig:
[user]
name = Luigi R. Viggiano
email = luigi.viggiano#...
[color]
ui = true
[merge]
tool = p4merge
[diff]
tool = p4merge
[push]
default = simple
your ~/.gitconfig is not in the correct format.
You don't need to put the commands:
git config --global user.name "trx"
git config --global user.email chazx#live.com
in a file... you need to type them at the terminal.
Delete your ~/.gitconfig and manipulate it using the git config command at the terminal, as explained in the tutorial.
These git config lines are commands that you should run, not the contents for the config file.

Resources