Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Push declined due to email pri

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Error in pushing local repository to github:

Exception information:

! [remote rejected] master -> master (push declined due to email privacy restrictions)

Abnormal cause:

When configuring git, the author mailbox information is set, triggering Github privacy protection settings:

Block command line pushes that expose my email

Solution:

Close Block command line pushes that expose my email option:

A lot of people choose to turn off the email option in GitHub; Block command line pushes that expose my email ; rude but not recommended.

Personal recommendations:

Change the email address for git configuration:

If you don't want to close the above settings, you can solve it by modifying Email:

1. Use the command to view the current global user Email: git config --global user.email2, Find your GitHub recommendation Email: Under setting--> Email --> keep my Email private, select Email; Format: id+username@users.noreply.github.com3. Reset your global user Email: git config --global user.email "Recommended Email from GitHub"4. Reset the author information of the last submission git commit --amend --reset-author Enter the command and enter vi mode (git default editor); Unfamiliar, can be directly in English input method:wq(colon wq) save 5, submit git push

If there are no other problems, we are done.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report