Git “Please tell me who you are”: set your identity
Set user.name and user.email, globally for the machine or locally for the repository.
Git does not know who you are. Run git config --global user.name "Your Name" and git config --global user.email "you@example.com", then commit again.
Try these fixes in order
Confirm the identity is missing
Confirm what is missing with git config user.name and git config user.email. Empty output means Git has no identity to record on commits.
git config user.namegit config user.emailSet the identity globally
Set the identity for the whole machine with --global. Use the name and email you want permanently recorded in history.
git config --global user.name "Your Name"git config --global user.email "you@example.com"Or set it per repository
If this repository needs a different identity (for example a work email), set it locally without --global from inside the repo; local config overrides global.
git config user.name "Work Name"git config user.email "work@example.com"Commit again
Retry the commit. In CI, set the identity in the pipeline config or export GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME, and GIT_COMMITTER_EMAIL instead.
git commit -m "Your message"Interpret what you see
Both config lookups print nothing
What it suggests: Git found no identity in the system, global, or local config, so it refuses to create the commit.
Next check: Run git config user.name and git config user.email; empty output confirms nothing is set.
The prompt appears in one repository but not others
What it suggests: An identity exists globally but this repository sets a different (or empty) local value.
Next check: Run git config --show-origin user.email to see which file supplies the value.
Config looks correct but commits still use the wrong identity
What it suggests: In CI or containers, GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables override config files.
Next check: Check env | grep GIT_ in the failing shell.
Why this happens
- user.name and user.email are not configured at any level, common on a fresh machine, in a container, or in CI.
- The identity is set globally but the repository overrides it with an empty local value, or environment variables point elsewhere.
Still not working?
Do not commit work under someone else's name and email to get past this prompt, and do not set a jokey identity you would not want in a permanent public history. Every commit records the identity forever.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.