Skip to main content

Blocking command line pushes that expose your personal email address

If you've chosen to keep your email address private when performing web-based operations, you can also choose to block command line pushes that may expose your personal email address.

When you push commits from the command line, the email address that you've set in Git is associated with your commits. If you enable this setting, each time you push to GitHub, we’ll check the most recent commit. If the author email on that commit is a private email on your GitHub account, we will block the push and warn you about exposing your private email.

有关提交电子邮件地址的详细信息, 包括用于 GitHub 的 noreply 电子邮件地址,请参阅 Setting your commit email address

  1. 在 GitHub 任意页面的右上角,单击个人资料照片,然后单击 “设置”****。
  2. 在侧边栏的“访问”部分,单击“ 电子邮件”。
  3. 要在执行基于 Web 的 Git 操作时对电子邮件地址保密,请选择“对我的电子邮件地址保密”****。
  4. To keep your email address private in commits you push from the command line, select Block command line pushes that expose my email.

Further reading