Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Push declined due to email pri

Shulou Source: shulou.com Published: 2022-06-02 19:11:55 11月14日 Update

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.

Tags: Recommendation information author global command user input configuration rough done personal warehouse colon reason can be passed address great work method format pattern Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL OPPO Reno MariaDB Shulou Technology