解决git向远程仓库推送时出现push declined due to email privacy restrictions

今天给大家分享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'

由于邮件的隐私问题推送取消。

二,问题解决

进入GithubSettings,选择Emails, 取消选择 Block command line pushes that expose my email 这项。

Github

再次推送便能成功了。

对象计数中: 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

有问题欢迎到志颖博客来交流!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值