Send local warehouse push to GitHub error:
Exception information:
! [remote rejected] master -> master (push declined due to email privacy restrictions)
Exception Reason:
The author mailbox information is set when you configure Git, triggering the GitHub privacy protection setting:
Block command line pushes that expose my email
Workaround:
Many people choose to turn off GitHub in the email Settings option Block command line pushes that expose my email;
Very rude but not recommended.
Personal recommendation:
If you do not want to close the above settings, you can modify the Email address:
1、使用命令查看当前的全局用户 Email: git config --global user.email2、找到你 GitHub 给的推荐 Email: 在 settting --> Email --> keep my Email private 选项下的 Email; 格式是:[email protected]3、重新设置你的全局用户 Email: git config --global user.email "GitHub 给的推荐 Email"4、重置上次提交的作者信息 git commit --amend --reset-author 输入命令后,进入vi模式( git 默认的编辑器); 不熟悉的,可以直接在英文输入法下:wq(冒号wq)保存5、提交 git push
If there are no other problems, you are done.
Push declined due to email privacy restrictions