【发布时间】:2013-01-17 17:21:30
【问题描述】:
这个问题似乎是重复的,但实际上并非如此。只是一个不断重复的细微差别。 git 不断告诉我:“请告诉我你是谁”,即使在设置之后也是如此。当我运行git commit 时,这就是我得到的......
$ git commit
*** 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 'Obby@ObbyWorkstation.(none)')
但是当我运行git config --global -l 时,它会提供我所有的详细信息...
$ git config --global -l
user.name=myname
user.mail=me.myself@gmail.com
http.proxy=proxy.XX.XX.XX:XXXX
我已经更改了我的姓名、电子邮件和代理,但是当我运行命令时它们看起来很好,即使在 .gitconfig 文件中我也可以看到这些值已设置。可能缺少什么,因为我根本无法承诺。每次它总是问我是谁?
@sheu 告诉我一些我改变的东西,但仍然是同样的问题。当我设置--local 时,git commit 仍然问我同样的问题。这是输出
$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
user.name=myname
user.mail=me.myself@gmail.com
【问题讨论】:
-
也许这篇文章可以回答你的问题stackoverflow.com/questions/2936652/…
-
@SumitMunot,我找不到有用的东西...我只有 master 分支,没有其他分支
-
@SumitMunot 在建议编辑时,请不要添加诸如“请帮助”和“提前致谢”之类的内容。不鼓励使用这样的短语,因为它们会给问题添加不必要的噪音。此外,您正在积极更改问题的标题,但在许多情况下缺少动词“是”。请确保您在建议编辑时使用正确的语法。
-
全局配置中不应该是
user.email吗(注意email中的e)?