Push declined due to email privacy restrictions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.