Git Commit - Author identity unknown, Please tell me who you are email


Git - Author identity unknown
# git commit -m "Initial commit"

Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@8b4ed5e4957e.(none)')

If you are trying to commit code to your git repository and you get Author identity unknown, then simply follow the two command instructions displayed.

Step 1: set user email

In the terminal run the below command with your email id for git,

git config --global user.email "you@example.com"
Step 2: set user name

In the terminal run the below command with your email id for git,

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

Now try to do a commit on your local branch,

% git commit -m "initial commit"
[master (root-commit) 3ebcd44] initial commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 MyClass.java
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.