1、git push -u origin master 时,报错如下:
$ git push -u origin master
Enumerating objects: 43, done.
Counting objects: 100% (43/43), done.
Delta compression using up to 8 threads
Compressing objects: 100% (40/40), done.
Writing objects: 100% (43/43), 14.71 KiB | 2.10 MiB/s, done.
Total 43 (delta 0), reused 0 (delta 0)
remote: Powered by GITEE.COM [GNK-5.0]
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 gitee.com:lukeru/lukeru_gitee_0504_001.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@gitee.com:lukeru/lukeru_gitee_0504_001.git'
2、解决办法:
2.1、打开链接 https://gitee.com/profile/emails
2.2、取消 如图选项
2.3、再次执行命令,git push -u origin master
2.4、发现这次不报错了,代码也传到了远程仓库