# Fix Git’s “Author identity unknown” error

Canonical: https://githtml.com/guides/git-author-identity-unknown-error
Published: 2026-11-23
Publisher: WaveTech LLC / gitHtml

When Git reports “Author identity unknown,” it lacks a usable identity for the commit it is trying to create. Configure the intended user.name and user.email in the appropriate scope, verify the effective values, and retry the commit after reviewing the index. This is a metadata problem, not proof that GitHub authentication failed.

## Identify what failed and what remains

A failed identity check generally leaves your staged changes available for another commit attempt. Do not restage the entire repository or reinitialize it. Start with status and the staged diff to confirm the proposed snapshot still contains only the intended work. If an editor or formatter changed files meanwhile, distinguish those newer working edits from the staged content.

Choose an identity suitable for the project. Employer and personal repositories may need different addresses, and public history can expose the address recorded in commits. Use your actual approved identity or exact privacy address, not the fictional values in a copied example.

## Configure narrowly and inspect the result

The example sets repository-local identity so unrelated projects are unaffected. Replace both values. If global defaults are intentional, configure them separately. --show-origin helps locate an overriding setting if Git still reports an unexpected identity. Environment-provided author or committer values may also matter in specialized workflows.

1. Retry the intended commit only after verifying the staged content and effective identity. Creating a placeholder commit is not necessary to repair configuration.
2. Inspect the resulting commit’s author and committer fields, especially if a tool or environment supplies metadata independently of your normal terminal settings.

````shell
git status --short
git config --local user.name "Example Contributor"
git config --local user.email "contributor@example.com"
git config --show-origin --get user.name
git config --show-origin --get user.email
git diff --staged
````

## Keep authentication separate

Changing user.email does not grant permission to a remote repository or repair an expired token. If the commit succeeds but a later push fails, investigate that new error at the transport and access layer. Conversely, successfully signing into GitHub does not guarantee Git has local author metadata. Preserve this distinction in support notes so another person can diagnose the actual failure without being given credentials or unrelated account information.

A commit can fail for another reason after identity is corrected, such as a local hook rejecting the snapshot. Read the new error independently instead of repeatedly changing identity settings that are already correct.

1. If a work repository reports your personal address, inspect the origin of both identity settings before applying a fix. A repository-local email can coexist with a global name, so check the effective pair rather than assuming both values came from the configuration file you just edited.
2. After the real commit succeeds, inspect its recorded email before sharing it publicly. Correcting configuration affects subsequent commits, not earlier history. If the wrong address was already published, treat any history rewrite as a separate coordinated decision rather than promising that a settings change removes the exposure.

## Sources and further reading

- [Git reference: git-config](https://git-scm.com/docs/git-config)
- [Git reference: git-commit](https://git-scm.com/docs/git-commit)

## Related guides

- [Record a case-only filename rename in Git](https://githtml.com/guides/git-case-only-filename-rename)
- [Preserve a commit made on the wrong Git branch](https://githtml.com/guides/git-committed-to-wrong-branch-preserve)
- [Fix “current branch has no upstream” deliberately](https://githtml.com/guides/git-current-branch-no-upstream-error)
- [Save commits made in detached HEAD state](https://githtml.com/guides/git-detached-head-save-commits)

Editorial approach: https://githtml.com/guides/about
