今天给大家分享git向远程仓库推送时出现push declined due to email privacy restrictions问题的解决办法。
一,问题重现
本人在使用git工具向远程仓库(Github)推送时出现push declined due to email privacy restrictions。
对象计数中: 3, 完成.
Delta compression using up to 4 threads.
压缩对象中: 100% (3/3), 完成.
写入对象中: 100% (3/3), 2.02 KiB | 2.02 MiB/s, 完成.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
To https://github.com/zyingzhou/bilibili
! [remote rejected] test -> test (push declined due to email privacy restrictions)
error: 无法推送一些引用到 'https://github.com/zyingzhou/bilibili'
由于邮件的隐私问题推送取消。
二,问题解决
进入Github的Settings,选择Emails, 取消选择 Block command line pushes that expose my email 这项。
再次推送便能成功了。
对象计数中: 3, 完成.
Delta compression using up to 4 threads.
压缩对象中: 100% (3/3), 完成.
写入对象中: 100% (3/3), 2.02 KiB | 2.02 MiB/s, 完成.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'test' on GitHub by visiting:
remote: https://github.com/zyingzhou/bilibili/pull/new/test
remote:
To https://github.com/zyingzhou/bilibili
* [new branch] test -> test