[git] Git: "please tell me who you are" error

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?

This question is related to git

The answer is


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

worked great for me.


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.


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


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"

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]"

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)


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.


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.


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


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.


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


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.


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


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"

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


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


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


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

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


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

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


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

This worked great for me.


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