分享

git 报错 You can only push commits that were committed with one of your own verified emails.

 python_lover 2022-11-23 发布于北京

1.报错

remote: GitLab: You cannot push commits for 'mailto:xxxx.sss@trip.com'. You can only push commits that were committed with one of your own verified emails.
To git.dev.sh.ctripcorp.com:yj.shao/hello-world.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@git.dev.sh.ctripcorp.com:yj.shao/hello-world.git'

2.原因

commit的时候邮箱不一致

3.解决

$ git log
$ git reset --hard 9e76350248a46a16b68fef25d27e25fcd4d65312  # 回滚到没错
$ git config --global user.email "你的邮箱地址"
改下邮箱,重新conmmit

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多