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


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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM