Guide

How to use a GitHub noreply email for git commits

Published

Every git commit records an author email. If that’s your personal address, it ends up in every public repository you push to, and in your local git config, where any AI coding agent working in your project can read it. GitHub gives every account a private noreply address you can use instead.

1. Find your noreply address

  1. On GitHub, open Settings → Emails.
  2. Turn on Keep my email addresses private.
  3. GitHub shows your noreply address under that option. It looks like ID+USERNAME@users.noreply.github.com, where ID is a number.

Accounts created before July 18, 2017 may have an older address without the number, in the form USERNAME@users.noreply.github.com. Use exactly what the settings page shows.

2. Use it in git

Set it as your default for all repositories:

git config --global user.email "ID+USERNAME@users.noreply.github.com"

Or only for the repository you are in:

git config user.email "ID+USERNAME@users.noreply.github.com"

Check what git will use:

git config user.email

3. Block pushes that expose your email (optional)

On the same Settings → Emails page, turn on Block command line pushes that expose my email. GitHub will then reject pushes with commits that use your private address.

What this does and doesn’t do

Does your AI agent leak your email?

Find out in about a minute. Free, no sign-up, results deleted after 1 hour.

Run the Agent Leak Test