Git More than one value for the key

Problem 1. when I run the command

$ git config --global
# or
$ git config --global

I get the following error message:

error: More than one value for the key

So it seems like I have multiple values stored against both my user name and email. I want to have one value stored in each.

Problem 2. The name shown against my commits on github is not linked to my account. means not hyper linked its blocked.

I searched a lot but got no satisfactory result to my problems. anyone can please help.


Are you using Windows or a Unix based system? If you are on a Unix based system you can check the config inside the config file. Go to your home folder and in there, there should be a hidden file called .gitconfig open it and see what info you have there. Maybe there is an error on the file.

Have a look in ~/.gitconfig

I'm guessing yours should look something like this:

  name = Sami
  email =
  name = Sami
  email =

Just remove the dupliucate entries to get rid of the message.

In terms of linking to github, check out this answer

git config -l #shows you what name, email and other stuff is saved
cat ~/.gitconfig #shows you samething(what's saved in your /home/username/.gitconfig)
To change stuff on existing commits in your machine you can try this on the commandline:
$ git config "Your Name"
$ git config ""
$ git submodule foreach --recursive 'git config "Your Name" && git config ""'

.... see rest here :

ps:if you have already commited stuff and want snyc with github, then ask another question(that is separate issue)

Solution to Problem 1: First look to see what is listed in the config:

git config --list

Example output:

enter code here

In this example, is listed twice. To remove the duplicate do:

git config --global --unset Anthony

Need Your Help

How to extract the title image of the web page html regex page-title

I want to extract the title image of a web page using C# in ASP.NET. I checked the windows and document objects but they don't have a property such as title. So searching for method to extract the ...

MongoDb Update only one value from array

php arrays mongodb laravel jenssegers-mongodb

I have a collection in mongodb which looks like this.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.