- 在 Git 提交时,出现如下错误信息
shell
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 'Administrator@LENOVO.(none)')
问题原因
- 这个错误信息表示需要配置用户名和邮箱,每次提交都会记录这些信息
处理策略
- 配置全局用户名和邮箱
shell
git config --global user.name 【用户名】"
git config --global user.email 【邮箱】
- 配置完成后,使用如下指令,查看所有配置
shell
git config --list