dwyl / dev-setup

✈️ A quick-start guide for new engineers on how to set up their Dev environment
77 stars 21 forks source link

GitHub No Reply Email Address for Privacy & Avoiding SPAM #22

Open nelsonic opened 5 years ago

nelsonic commented 5 years ago

While researching how to fix the issue of git commits not being authored #21 & #12 I stumbled up on: https://help.github.com/articles/about-commit-email-addresses/

If you'd like to keep your personal email address private, you can use a GitHub-provided no-reply email address as your commit email address. To use your noreply email address for commits you push from the command line, use that email address when you set your commit email address in Git. To use your noreply address for web-based Git operations, set your commit email address on GitHub and choose to Keep my email address private.

If you haven't enabled email address privacy, you can choose which verified email address to author changes with when you edit, delete, or create files on GitHub. If you enabled email address privacy, then the commit author email address cannot be changed and is username@users.noreply.github.com by default.

This might be a good idea for avoiding Spam and Phishing ... 🤔

introt commented 2 years ago

Hi, popping in from search results. These days the noreply addresses consist of an user id in addition to the username. The easiest way to find these out seems to be using the GitHub REST API:

$ curl https://api.github.com/users/ghost
{
  "login": "ghost",
  "id": 10137,
...

@ghost's no-reply email would thus be 10137+ghost@users.noreply.github.com. Normal users' id numbers are 7 digits.

Edit: Here's a tool that creates a a "Co-Authored-By" -line (real name, if any, and no-reply email address included) from either a GitHub username or a issue/pull request url: https://gist.github.com/introt/ad30bcbdf789aed5bba43082741c7769 - you can see it in action eg. here.

real-Sandip-Das commented 1 year ago

How do I read the inbox of my noreply email address? For example, I signed up on Topcoder using github and they are sending notifications(e.g. Account Activation Code etc.) in that noreply email id

nelsonic commented 1 year ago

@real-Sandip-Das this isn't the GitHub forum for these kinds of follow-up questions. ❓ It seems pretty logical that a no-reply email address wouldn't have an "inbox" you can check. 💭 The first result on Google is: https://stackoverflow.com/questions/65186849/sending-an-email-to-github-no-reply-email-id "If you try to send mail to that domain, it will be returned as undeliverable."

When you use GitHub OAuth you can select to provide the auth consumer - in this case Topcoder - with your "real" email address. 📧 i.e. you can select your real email address for OAuth. Which is what I do. 👌