Push trusted due to email privacy restrictions (gh007 error code) solution
An error is reported when pushing the local warehouse to GitHub:
exception information:
! [remote rejected] master -> master (push declined due to email privacy restrictions)
Exception reason: when configuring git, the author’s email information is set, triggering GitHub privacy protection settings: block command line pushes that expose my email
Solution:
Turn off block command line pushes that expose my email:
Many people choose to turn off the email setting option block command line pushes that expose my email in GitHub; It’s rude, but it’s not recommended.
Personal recommendation:
Change the email address of GIT configuration: if you don’t want to turn off 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.email
2. Find GitHub recommended email: in setting — & gt; Email –> Email under keep my email private; The format is: ID+ [email protected]
3. Reset global user email: git config — global user.email “recommended email from GitHub”
4. Reset last submitted author information git commit — amend — reset author
After entering the command, enter VI mode (GIT default editor);
5. Resubmit git push