working on a lab machine which has a shared login. don’t want to set global git config parameters.
git commit --author="username <email>"
This used to work on older git versions. now it produces this error:
*** 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 'blah@blah.(none)')
Any thoughts?
asked Apr 16, 2015 at 20:28
7
What if you set the git config info just for the current repository?
git config user.email "you@example.com"
git config user.name "Your Name"
EDIT
Based on OP comment a possible solution is:
GIT_AUTHOR_EMAIL="you@email.com" && GIT_AUTHOR_NAME="Your Name" && git commit
answered Apr 16, 2015 at 20:32
AguardienticoAguardientico
7,5411 gold badge32 silver badges32 bronze badges
6
First, With Git 2.29 (Q4 2020), the error message is clearer.
See commit 9ed104e (21 Aug 2020) by Junio C Hamano (gitster).
(Merged by Junio C Hamano — gitster — in commit e9bd00a, 31 Aug 2020)
ident: say whose identity is missing when givinguser.namehint
If
user.nameanduser.emailhave not been configured and the user invokes:git commit --author=...without specifying the committer identity, then Git errors out with a message asking the user to configure
user.nameanduser.emailbut doesn’t tell the user which attribution was missing.This can be confusing for a user new to Git who isn’t aware of the distinction between user, author, and committer.
Give such users a bit more help by extending the error message to also say which attribution is expected.
The error message will clearly state:
Author identity unknown
# or
Committer identity unknown
Second, from OP’s comment:
Other people use the machine and the same repo. I guess I could set up the git config and then remove the configuration when I’m done
You can wrap the git command and forcing each used to identify themselves (once per shell session).
See «Best pracitces for multi-developer Git for single user application» and my project VonC/gitw.
answered Sep 1, 2020 at 18:47
![]()
VonCVonC
1.2m506 gold badges4243 silver badges5061 bronze badges
Another solution is, to set the identity just for one run of git commit and make use of the -c option of git.
git -c user.name="Your Name" -c user.email="you@example.com" commit -m "message"
My scenario is to run a docker container with setting a user (not being root in the container), with has no write permission on it home directory. The image is docker.io/alpine/git.
$ docker run -u 1004:1005 -it --rm --entrypoint=/bin/sh docker.io/alpine/git
~ $ git config --global user.email "you@example.com"
error: could not lock config file /git/.gitconfig: Permission denied
answered Aug 13, 2022 at 11:55
white_geckowhite_gecko
4,6594 gold badges50 silver badges75 bronze badges
1
In Terminal:
git config --global user.email "nive54@gmail.com"git config --global user.name "Nivetha"
Note:
GitHub registered email —>
nive54@gmail.comYour system name —>
Nivetha(Refer tothispc->propertiesfor this.)
![]()
Olivia Stork
4,5905 gold badges26 silver badges39 bronze badges
answered Jan 15, 2021 at 12:17
0
In Github Desktop while pushing a code you may face an error saying,
Author Identity Unknown
In this article, we will show some easy methods to solve the error.
Solution 1:
- To check if git is available on your pc open the command prompt and run
git --version
- Then, you need to set your git credentials globally in your machine. Just run on your command prompt or Git Bash
git config --global user.email "Your Email" git config --global user.name "Your Name"
Now try to push your code.
Solution 2:
- Click on the Profile icon in the upper-right corner then click on Settings
- Then, from the left-sidebar go to Emails
- From this setting, you can select your email preference. You can add a new email and make it a primary email
- After setting up Github email, open your Github Desktop app.
- From top menu go to the File menu, then click on Options
- Then click on Git from the left sidebar.
- Here type your preferred Name and your Github Email which you set up in the previous step. Finally, Save the update.






Now, try to perform git operations. Hope it will work fine.
Thanks for reading the article. Hope it will solve your problem. If you face any problems, don’t hesitate to comment here.
Describe the bug
When attempting to commit or push changes, I get the error ‘Author Identity Unknown’, despite already having set global user.name and user.email on Git.
Relevant errors (if available)
Error: 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 'athshean@desktop.(none)') at Object.action (plugin:obsidian-git:23914:25) at PluginStore.exec (plugin:obsidian-git:23939:25) at eval (plugin:obsidian-git:21526:43) at new Promise (<anonymous>) at GitExecutorChain.handleTaskData (plugin:obsidian-git:21524:16) at GitExecutorChain.eval (plugin:obsidian-git:21508:44) at Generator.next (<anonymous>) at fulfilled (plugin:obsidian-git:20357:24)
Steps to reproduce
- Fresh install of Ubuntu 22.04.1
- Fresh install of Obsidian v1.0.3
- Installed git v2.34.1 via
apt-get - Ran
git config --global user.emailandgit config --global user.name - Created fresh repository, used
git cloneto clone repo. - Opened workspace as a vault in Obsidian
- Installed Obsidian Git v.2.9.0
- Attempted to commit changes via command palette
Expected Behavior
Commit changes and push to remote
Addition context
Git commit and push works fine when used in terminal. The problem seems to be with obsidian-git.
Operating system
Linux
Plugin version
2.9.0

Add Answer
|
View In TPC Matrix
Technical Problem Cluster First Answered On
September 28, 2021
Popularity
9/10
Helpfulness
8/10
Contributions From The Grepper Developer Community
Contents
Code Examples
Related Problems
TPC Matrix View Full Screen
git commit -m Author identity unknown
Comment
0
Popularity
9/10 Helpfulness
8/10
Language
shell
Source: stackoverflow.com
Tags: author
git-commit
identity
shell

Contributed on Sep 28 2021
Nutty Newt
4 Answers Avg Quality 8/10
Grepper
Features
Reviews
Code Answers
Search Code Snippets
Plans & Pricing
FAQ
Welcome
Browsers Supported
Grepper Teams
Documentation
Adding a Code Snippet
Viewing & Copying Snippets
Social
Twitter
LinkedIn
Legal
Privacy Policy
Terms
Contact
support@codegrepper.com