解決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

有問題歡迎到志穎博客來交流!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章