I hope you can answer me today!
Docs from git help commit says:
COMMIT INFORMATION Author and committer information is taken from the following environment variables, if set: GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_COMMITTER_DATE
I set GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL, GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL variables by doing these commands:
# export GIT_AUTHOR_NAME=".."
# export GIT_AUTHOR_EMAIL=".."
# export GIT_COMMITER_NAME=".."
# export GIT_COMMITER_EMAIL=".."
I checked their content with echo
But git commit command still says me:
# git 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@fedora.(none)')
I need to do it as root for some reason
Yes, I know that I can simply do that git config .. command, but it's curious to me why I can't tell git this info with these environment variables