What does "private" email address mean in context of GitHub web and Git commands?

Hello,

At https://github.com/settings/emails, I checked the two boxes “Keep my email addresses private” and “Block command line pushes that expose my email”. Then I got a notification saying:

“Commits pushed with a private email will now be blocked and you will see a warning.”

What is “private” in this context?

  • A: john.doe@mail.com
  • B: 31415926+tesla@users.noreply.github.com

Is it A or is it B?

Q: Does this mean that if user.email in Git config file is set to A I will not be able to push to the repo on GitHub?

Q: In other words, if “Block command line pushes …” is set, I need to make sure that my Git config uses email B to ensure I can still push to the repo on GitHub?

Q: Also, when I check “Keep my email addresses private”, does this mean that the GitHub noreply email address (B) will be used when using GitHub web interface?

Q: When using GitHub web interface, where are these email addresses exposed? Despite having one public repo on GitHub I can’t find any place where this email is listed.

Sorry for these noob questions, I’m new to Git and to GitHub. Just trying to understand how to keep my email address private and still be able to use and learn Git from the command line and from GitHub web interface.

Regards,
lusrx

Great questions :grinning:

What is “private” in this context?

A is the “private” email, in other words, the email that you don’t want exposed publicly.

Does this mean that if user.email in Git config file is set to A I will not be able to push to the repo on GitHub?

Yes, that’s correct.

In other words, if “Block command line pushes …” is set, I need to make sure that my Git config uses email B to ensure I can still push to the repo on GitHub?

Yes, that’s correct.

Also, when I check “Keep my email addresses private”, does this mean that the GitHub noreply email address (B) will be used when using GitHub web interface?

Yes, that’s correct.

When using GitHub web interface, where are these email addresses exposed? Despite having one public repo on GitHub I can’t find any place where this email is listed.

I’m not sure what you’re asking here. Can you be more specific as to what you mean exactly?

Let us know!

1 Like

Thanks!

You know, sometimes I doubt myself and seek confirmation from others, even though I seem to understand things fairly well (English is not my first language). It takes time, experience and conviction to accept the truth. But some things are just so complex to wrap your head around, they are not always easy to test. Which is why it’s great that we have fantastic people in the community who can help each other out! :hugs:

I am trying to understand the visibility level or impact level. In other words, if I decide against keeping my “private” email (A) private, who can see it and where? I think I have seen these emails listed in git command line when I look at the log, but I only see usernames when looking at the commit history on GitHub.

1 Like

Github showing usernames in the web UI is only a UI thing, it doesn’t change anything about the repository data. If anyone clones the repository and looks at the log or looks at the raw commits over the web interface (try attaching .patch to any commit URL), they will see the name and mail address in the commit, not your Github username.

1 Like