Git push被拒绝,并显示以下错误消息:
expected committer email '' but found '[email protected]'
我已经尝试过了:
但没有一个有效。我还能做些什么来解决它。
这似乎不是一个git限制,但应该是远程端的某种预接收挂钩(您要推送的Git存储库托管服务/服务器)
该钩子似乎解析提交并检查提交者电子邮件与拒绝[email protected]
的特定标准。
您应该与远程端管理员核实,看看发生了什么。
OP Karan Singla确认in the comments这是服务器端的一个问题:
问题得到解决。管理员重新创建了我的帐户,现在工作正常。
这对我有用
git config --global user.name "Correct Name"
git config --global user.email [email protected]
git commit --amend --reset-author
我建议打开git终端并设置正确的电子邮件。当我遇到同样的问题时,这对我有用。
git config --global user.email "[email protected]"
有一个类似的情况,涉及一个钩子,正如@VonC所提到的,同时尝试初始推送(包含我和其他同事的提交)到一个空的内部Bitbucket Git回购。在我的情况下,它是抱怨的YACC(Yet Another Commit Checker)钩子,也见这个Atlassian article。
但是,而不是全局停用钩子(正如Atlassian文章所建议的那样),我明确地为我的repo激活它,使用空设置(覆盖我的repo的全局钩子设置),进行初始推送,然后再次禁用插件我的repo(使插件仍处于活动状态,但配置了全局服务器设置!)。
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