Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git: "please tell me who you are" error

Tags:

git

People also ask

How do I fix author identity unknown in git?

When linking a commit to a Story, you may see "Unknown Author" in the Commit section. This indicates that the email address you used in your GitHub, GitLab, or Bitbucket account doesn't match the email address you used for your Shortcut account. To correct this: Go to Settings > Your Account > Email Addresses.

How do I set identity only in this repository?

Run git config --global user. email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository.


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.


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.


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

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

worked great for me.


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


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

This worked great for me.