【发布时间】:2020-04-23 00:00:50
【问题描述】:
我以前使用过很多次 git,但自从我安装了新的 Linux 后,我一直无法提交我的更改。我不断收到此错误:
*** 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: empty ident name (for <my@mail.com>) not allowed
当然,我使用自己的凭据运行提供的步骤,每次尝试提交更改时都会收到相同的错误。
git config -l --show-origin
file:/home/george/.gitconfig user.email=my@mail.com
file:/home/george/.gitconfig user.name=George Lastname
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=true
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config remote.origin.url=https://github.com/mygithub/repo
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master
【问题讨论】:
-
您是否有可能安装了两个不同版本的 Git,其中一个使用
/home/george/.gitconfig进行--global设置,其中一个使用其他目录进行--global设置?
标签: linux git github git-commit git-config