项目场景:
通过git连接到远程仓库时出现private email address连接不上
问题描述:
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/luoyu98/ly20-12.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to ‘https://gitee.com/luoyu98/ly20-12.git’
原因分析:
gitee里的邮箱设置成了私有,没有公开
解决方案:
把“不公开我的邮箱地址”和“禁止命令行推送暴露个人邮箱”的√去掉再通过git命令连接即可: