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:
git config user.email "insert github email here"
git config user.name "insert github real name here"
This worked great for me.
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 = your_username@users.noreply.github.com
[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 "you@example.com"
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.
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
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.
To fix I use: git config --global user.email "you@example.com" and works.
user.mail no work, need to put an E. Typo maybe?
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 "someone@someplace.com"
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.