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?
Solution 1:
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:
git init
git config user.name "someone"
git config user.email "[email protected]"
git add *
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:
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:
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]"