GIT错误: - 预期的提交者电子邮件''但找到'[email protected]'

问题描述 投票:13回答:6

Git push被拒绝,并显示以下错误消息:

expected committer email '' but found '[email protected]'

我已经尝试过了:

  1. 在.gitconfig文件中设置使用属性。
  2. 尝试git push制作相同存储库的不同克隆。
  3. 格式化后将所有整个系统设置在一起。

但没有一个有效。我还能做些什么来解决它。

git commit git-commit git-config
6个回答
3
投票

这似乎不是一个git限制,但应该是远程端的某种预接收挂钩(您要推送的Git存储库托管服务/服务器)

该钩子似乎解析提交并检查提交者电子邮件与拒绝[email protected]的特定标准。 您应该与远程端管理员核实,看看发生了什么。


OP Karan Singla确认in the comments这是服务器端的一个问题:

问题得到解决。管理员重新创建了我的帐户,现在工作正常。


35
投票

这对我有用

git config --global user.name "Correct Name" 
git config --global user.email [email protected] 
git commit --amend --reset-author

0
投票

我建议打开git终端并设置正确的电子邮件。当我遇到同样的问题时,这对我有用。

git config --global user.email "[email protected]"

0
投票
git config --list --show-origin

允许您查看设置来源的文件。在我的情况下,这是一个无关的git设置文件以某种方式使它成为我的便携式git install.screenshot of file list


0
投票

有一个类似的情况,涉及一个钩子,正如@VonC所提到的,同时尝试初始推送(包含我和其他同事的提交)到一个空的内部Bitbucket Git回购。在我的情况下,它是抱怨的YACC(Yet Another Commit Checker)钩子,也见这个Atlassian article

但是,而不是全局停用钩子(正如Atlassian文章所建议的那样),我明确地为我的repo激活它,使用空设置(覆盖我的repo的全局钩子设置),进行初始推送,然后再次禁用插件我的repo(使插件仍处于活动状态,但配置了全局服务器设置!)。


0
投票
This work for me :
git config --global user.name "Correct Name" 
git config --global user.email [email protected] 
git commit --amend --reset-author
it will show the screen where you can edit the commit message, after edit or keep it as it is, then press escape and then :wq and hit enter
git push
© www.soinside.com 2019 - 2024. All rights reserved.