问题描述
git推送项目到gitee仓库报错原因竟然是我没有公开邮箱导致
$ git push origin master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 325 bytes | 325.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.2]
remote: error: GE007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: https://gitee.com/profile/emails
remote: error: hook declined to update refs/heads/master
To https://gitee.com/zsoco/html.git
! [remote rejected] master -> master (hook declined)

原因分析
gitee里的邮箱设置成了私有,没有公开导致

解决方案
把“不公开我的邮箱地址”和“禁止命令行推送暴露个人邮箱”的√去掉再通过git命令连接即可:
