Git: "please tell me who you are" error

Git

Git Problem Overview


I have app servers that I bootstrap together using Chef + some ad-hoc bash scripts. The problem is, when I want to run an update on one of these app servers, I get:

19:00:28: *** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

Do I really need to set this for doing a simple git pull origin master every time I update an app server? Is there anyway to override this behavior so it doesn't error out when name and email are not set?

Git Solutions


Solution 1 - Git

I spent lots of hours on it when I call PHP script to init and commit to git. And I found the work flow should be as:

  1. git init
  2. git config user.name "someone"
  3. git config user.email "[email protected]"
  4. git add *
  5. git commit -m "some init msg"

If you swap [23] and 1, the config will not work at all.

I wish this will do some help.

Solution 2 - Git

Instead of doing a git pull, you can do:

git fetch
git reset --hard origin/master

Neither of those require you to configure your git user name / email.

This will destroy any uncommitted local changes / commits, and will leave your HEAD pointing to a commit (not a branch). But neither of those should be a problem for an app server since you shouldn't be making local changes or committing to that repository.

Solution 3 - Git

it works for me, try This.. you need to configure your terminal with remote access.

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

Solution 4 - Git

If you are using sourcetree: Repository -> Repository Settings --> Advanced --> uncheck "Use global user settings" box

worked great for me.

Solution 5 - Git

Update your bootstrap process to create a ${HOME}/.gitconfig with the proper contents, or to copy an existing one from somewhere.

Solution 6 - Git

git config user.email "insert github email here"
git config user.name "insert github real name here"

This worked great for me.

Solution 7 - Git

In my case I was missing "e" on the word "email" as Chad stated above but I see its not the case with you. Please hit the following command to see if everything is pulling as expected.

git config -l

Solution 8 - Git

It is unable to auto-detect email address.

By default it takes your system username like [email protected].

So you need to set your email like below:

git config user.email "[email protected]"

After setting email you can run the git commands and commit your changes.

  1. git init
  2. git add *
  3. git commit -m "some init msg"

Solution 9 - Git

Same issue was with me and resolved it by adding default name and email Repository Settings.

As Doron suggested -

If you are using sourcetree: Repository -> Repository Settings --> Advanced --> uncheck "Use global user settings" box.

Add default name and email address.

Solution 10 - Git

For me the issue was network connection, once I reconnected to my wifi, it could fetch the details and commit without any issues.

Solution 11 - Git

You must Write Your email like that

 git config --global user.email "[email protected]"

Then: Write Username

 git config --global user.name "Your Name"

After That Poupup window will appear

Write USERNAME & EMAIL For Acount YOU want contribute

Solution 12 - Git

I had this as a faulty error message:
git pull worked fine on the cmd line
git pull failed in a Perl CGI process (a webhook to auto-deploy from github) with the above error.

Doing a git status identified a clashing file. Sorting it fixed the problem.

Problem reoccurred later when I changed some config settings.

This time, setting $HOME and $USER env vars fixed it (are unset by default in a CGI process)

Solution 13 - Git

Have a look at the config file.

Repository > Repository Settings > Edit config file.

Check if the [user] section exists. If the user section is missing, add it.

Example:

[user]
name = "your name"
email = "your email"

Solution 14 - Git

i use heroku cli

  1. must use all user name and user email

$git config --global user.email .login email.

$git config --global user.name .heroku name.

  1. git pull [git url]

  2. git init

  3. git add *

    5 git commit -m "after config user.name ,user email"

  4. git push heroku master

Solution 15 - Git

I use Jenkins and ran into this problem when trying to perform a release (which requires a git commit). To fix the issues, I needed to add a Custom user name/e-mail address (see picture) Custom user name/e-mail address This ensured that when the code was checked out it used my build user's name/email address when performing the release. Note, this configuration is available from the Jenkins Multibranch Pipeline project configuration.

Solution 16 - Git

git pull should not require this. However if the pull causes a merge conflict, then it seems nessecary.

Solution 17 - Git

>>Do I really need to set this for doing a simple git pull origin master every time I update an app server? Is there anyway to override this behavior so it doesn't error out when name and email are not set?

It will ask just once and make sure that the rsa public key for this machine is added over your github account to which you are trying to commit or passing a pull request.

More information on this can be found: Here

Solution 18 - Git

I ran into this error message whilst trying to commit some files.

Simply running git fetch then trying my commit again worked for me.

Solution 19 - Git

IMHO, the proper way to resolve this error is to configure your global git config file.

To do that run the following command: git config --global -e

An editor will appear where you can insert your default git configurations.

Here're are a few:

[user]
	name = your_username
	email = [email protected] 
[alias]
	# BASIC
	st = status
	ci = commit
	br = branch
	co = checkout
	df = diff

For more details, see Customizing Git - Git Configuration

When you see a command like, git config ...

$ git config --global core.whitespace \
    trailing-space,space-before-tab,indent-with-non-tab

... you can put that into your global git config file as:

[core]
   whitespace = space-before-tab,-indent-with-non-tab,trailing-space

For one off configurations, you can use something like git config --global user.name 'your_username'

If you don't set your git configurations globally, you'll need to do so for each and every git repo you work with locally.

The user.name and user.email settings tell git who you are, so subsequent git commit commands will not complain, *** Please tell me who you are.

Many times, the commands git suggests you run are not what you should run. This time, the suggested commands are not bad:

$ git commit -m 'first commit'

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

Tip: Until I got very familiar with git, making a backup of my project file--before running the suggested git commands and exploring things I thought would work--saved my bacon on more than a few occasions.

Solution 20 - Git

To Set config for this/current repo only just remove --global and set name/email like this:

$ git config user.name "John Doe" 
$ git config user.email "[email protected]" 

Solution 21 - Git

If you find the old default behavior useful (i.e. make commits with the local username and hostname as the author identification, instead of identifying you the person), you can run:

git config --global user.name "$USER" && git config --global user.email "$USER@$HOSTNAME"

Solution 22 - Git

To fix I use: git config --global user.email "[email protected]" and works.

user.mail no work, need to put an E. Typo maybe?

Solution 23 - Git

That’s a typo. You’ve accidently set "user.mail" with no "e". Fix it by setting "user.email" in the global configuration with

git config --global user.email "[email protected]"

Found solution here

https://stackoverflow.com/a/14662703

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionrandombitsView Question on Stackoverflow
Solution 1 - GitluxuiaView Answer on Stackoverflow
Solution 2 - GitgfxmonkView Answer on Stackoverflow
Solution 3 - GitKuldeep SinghView Answer on Stackoverflow
Solution 4 - GitDoronKView Answer on Stackoverflow
Solution 5 - GittwalbergView Answer on Stackoverflow
Solution 6 - GitMrRobot4.0View Answer on Stackoverflow
Solution 7 - GitGodfreyView Answer on Stackoverflow
Solution 8 - GitAMIT SAMOTAView Answer on Stackoverflow
Solution 9 - GitRahulView Answer on Stackoverflow
Solution 10 - GitSharukh MastanView Answer on Stackoverflow
Solution 11 - GitAbubakr ElghazawyView Answer on Stackoverflow
Solution 12 - GitAndrew MurphyView Answer on Stackoverflow
Solution 13 - GitAman SrivastavaView Answer on Stackoverflow
Solution 14 - GitlineproView Answer on Stackoverflow
Solution 15 - GitCraigView Answer on Stackoverflow
Solution 16 - GitKjeld FlarupView Answer on Stackoverflow
Solution 17 - GitMansab UppalView Answer on Stackoverflow
Solution 18 - Gitbergie3000View Answer on Stackoverflow
Solution 19 - Gitl3xView Answer on Stackoverflow
Solution 20 - GitQuick learnerView Answer on Stackoverflow
Solution 21 - GitVladimir PanteleevView Answer on Stackoverflow
Solution 22 - GitVictor Hugo Nogueira dWolfView Answer on Stackoverflow
Solution 23 - GitGirish JoshiView Answer on Stackoverflow