git push 出现有将error remote: ERROR: committer email address

在给google提code或者自己公司提code的时候,可能会出现这中邮箱不匹配的问题。


git commit之后,进行git push时,发生如下error

remote:
remote: ERROR:  In commit 98e9d43e685f0a2965dc60471b5f0bc88659f073
remote: ERROR:  committer email address SPREADTRUM\AAAA@tj03805pcu1.BBBB.com
remote: ERROR:  does not match your user account.
remote: ERROR:
remote: ERROR:  The following addresses are currently registered:
remote: ERROR:    AAAA@CCCC.com
remote: ERROR:
remote: ERROR:  To register an email address, please visit:
remote: ERROR:  https://android-review.googlesource.com/#/settings/contact



遇到这种错误,需要修改config文件,来达到效果。

vim ~/.gitconfig

把这个文件里的[user]修改一下,没有的添加一下

[color]
    ui = auto
[commit]
    template = /home/local/SPREADTRUM/AAAA/.commit_template
[user]
    name = AAAA
    email = AAAA@CCCC.com
[core]
    editor = vim
[http]
    cookiefile = /home/local/XXXXX/AAAA/.gitcookies​



没有更多推荐了,返回首页