GitHub Privacy Email No Reply: What It Is and How to Use It
In this article
GitHub's no-reply email is an address like 12345678+username@users.noreply.github.com that lets you make commits and receive notifications without exposing your real email address. To use it, go to your GitHub account settings, enable email privacy, and set your Git client to use the no-reply address for commits. This guide walks you through the exact steps on desktop and explains what to do when things don't work as expected.
What You'll Need
- A GitHub account (free or paid).
- Access to your GitHub account settings (you must be signed in).
- Your Git client installed (command line, GitHub Desktop, or an IDE with Git integration).
- Your real email address already verified on GitHub (so you can receive notifications if needed).
Step-by-Step
- Find your no-reply address. Sign in to GitHub, click your profile picture in the top right, and choose Settings. In the left sidebar, click Emails. Your no-reply address is shown near the top of the page. It has the form
ID+username@users.noreply.github.com. Copy it exactly; the ID is a number unique to your account. - Enable email privacy. On the same Emails page, tick the checkbox labeled Keep my email addresses private. This tells GitHub to use your no-reply address for web-based Git operations (like editing files directly on github.com) and to hide your real email from your profile and commit metadata. Click Save if a save button appears.
- Block command-line pushes that expose your email. Still on the Emails page, tick Block command line pushes that expose my email. This prevents you from accidentally pushing commits made with your real email address. If you try, GitHub will reject the push with an error message. This setting is optional but recommended if you want a hard guarantee.
- Configure Git to use the no-reply address for commits. Open your terminal or command prompt and run:
git config --global user.email "your-no-reply-address@users.noreply.github.com"
Replace the address with the one you copied. Also set your name if you haven't already:git config --global user.name "Your Name"
This change applies to all repositories on your computer. To set it for a single repository only, omit--globaland run the command inside that repository. - Update existing commits (optional). If you have already pushed commits with your real email, you can rewrite history to use the no-reply address. This is advanced and rewrites commit hashes. For a single recent commit, use
git commit --amend --author="Your Nameand then force-push. For multiple commits, use an interactive rebase or a tool like" git filter-repo. Be aware that force-pushing changes history for anyone who has cloned the repository; coordinate with collaborators first. - Verify your settings. Make a test commit in a private repository and push it. Then view the commit on GitHub: the author email should show your no-reply address. You can also check your profile's public activity; your real email should not appear.
Note: Menu labels and exact wording can differ slightly between GitHub versions, regions, or whether you are using the web interface versus the mobile app. The steps above are for the desktop web interface, which is where these settings live. The GitHub mobile app does not provide access to the email settings page; use a browser for that.
Common Mistakes
- Using the wrong no-reply format. The address must include the numeric ID and your username, exactly as shown in settings. Copy-pasting from an old source may give an outdated format that GitHub no longer accepts.
- Forgetting to set Git's user.email. Enabling privacy on GitHub's website does not change your local Git configuration. You must run the
git configcommand separately. - Assuming the setting applies retroactively. Enabling privacy only affects future commits and web operations. Existing commits keep the email they were made with unless you rewrite history.
- Ignoring the block command-line pushes setting. Without it, you can still push commits with your real email if your local Git is misconfigured. The block setting acts as a safety net.
- Using the no-reply address for notifications. The no-reply address cannot receive email. If you want email notifications, keep a verified real email on your account and let GitHub forward notifications there.
Tips
- Use the same no-reply address across all your devices by setting it globally with
git config --global. - If you contribute to open-source projects, check their contribution guidelines: some projects require a real email for sign-off or licensing reasons.
- You can have multiple email addresses on GitHub, but only one can be the primary. The no-reply address is automatically generated and cannot be changed.
- To keep your real email out of commit metadata entirely, consider using a pseudonymous name as your Git
user.nameas well. - Regularly review your email settings after GitHub updates its interface; the location of the privacy toggles may shift.
Troubleshooting
- Push rejected with "email privacy" error. This means you tried to push a commit made with your real email while the block setting is on. Amend the commit author to your no-reply address, or temporarily disable the block setting (not recommended).
- Commits still show my real email. Check your local Git config with
git config --list. Ifuser.emailis not the no-reply address, set it. Also check for repository-specific overrides in.git/config. - No-reply address not visible. Ensure you are signed in and looking at the correct account. If you have multiple accounts, switch to the right one. The address appears only after you enable privacy or after your first commit with it.
- Cannot find the Emails settings. On GitHub, click your profile picture, then Settings, then Emails in the left sidebar. If you are using a mobile browser, the layout may differ; try rotating to landscape or using a desktop browser.
- Force-push fails after rewriting history. Some branches are protected. You may need to temporarily disable branch protection or ask a repository admin. This is a destructive operation; back up your work first.
Frequently Asked Questions
Can I use the no-reply address to sign in to GitHub?
No. The no-reply address is for commit metadata and web-based Git operations only. You must sign in with your username or your verified real email address.
Will enabling privacy hide my email from existing commits?
No. Existing commits retain the email they were made with. You must rewrite history to change them, which alters commit hashes and requires force-pushing.
What happens if I disable email privacy later?
Future commits will use your real email again if your Git client is configured that way. The no-reply address remains available but is no longer used automatically for web operations.
Does the no-reply address work for notifications?
No. It cannot receive email. GitHub sends notifications to your verified real email addresses. You can manage notification settings separately.
Can I choose my own no-reply address?
No. GitHub generates it automatically based on your user ID and username. You cannot customize it.
Is the no-reply address the same for all my repositories?
Yes. It is tied to your GitHub account, not to individual repositories. However, your local Git configuration can override it per repository if you set a different user.email.