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

相关文章:

  • 2022-12-23
  • 2021-08-26
  • 2021-07-09
  • 2021-10-31
  • 2021-04-26
  • 2021-09-26
  • 2021-10-17
猜你喜欢
  • 2021-09-20
  • 2022-03-07
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
相关资源
相似解决方案