Github: "This email will not be used for commit blame"
Asked Answered
F

1

7

How can I use a fake email address with Github?

Following Github's since-changed instructions, I had a fake email like [email protected] configured with git (git config --global user.email "[email protected]") and registered on my email settings page.

It was linking my commits, but not since the past week or so, and it has a "(?)" tooltip saying:

This email will not be used for commit blame

My real email address is verified and blamable, but I want to keep it private.

How can I use a fake one and still be blamed?

Foxhole answered 26/2, 2014 at 16:38 Comment(0)
F
7

Github has seen many collisions with generic and fake email addresses and have changed how they are registered.

Do two things and an optional third.

1. On the email settings page check the box:

Keep my email address private.

We will use [email protected] when performing git operations and sending outgoing email on your behalf.

2. The "Keeping your email address private" help page says to use "[email protected]".

Change git config to [email protected]:

git config --global user.email "[email protected]"

3. Optionally rewrite history on your repos to change the author -- but heed the warnings!


This help page says to contact Github to backfill previous contributions, but this only applies to verifiable addresses.

I asked Github support. They said:

As you've noticed, we've made some recent changes to how emails are used for commit blame and counting contributions. We were seeing a large number of collisions with generic and "fake" emails, which were confusing users. Unfortunately that means that commits made with an address like "server.fake" will no longer be linked up to your GitHub account.

The backfilling process only works for email addresses that can be accepted by our system and used for commit blame, so unfortunately that wouldn't help in your situation.

If you want to link up the old commits, it will require rewriting the history to use your [email protected] address. We have a guide on that, though you may want to give it some consideration if there are other users using your repositories, as history rewriting can be a fairly disruptive activity.

Foxhole answered 26/2, 2014 at 16:38 Comment(6)
I actually tested this out independently. (1) Using "Keep my email address private" will still reveal your email address in the url for the commits appended with .patch. (2) I tried using <username>@users.noreply.github.com, but this prevents your contributions from being recorded on your profile page. It seems like you need a "real" email address. However, the address doesn't have to be verified by clicking the link that GitHub emails, so perhaps a "real-sounding" email address is good enough.Georgeannageorgeanne
@Georgeannageorgeanne I'm using <username>@users.noreply.github.com and they're linked to my profile.Foxhole
Hmm… I'm not sure what's going on there. Are these recent commits? I've only noticed them missing from my profile quite recently.Georgeannageorgeanne
@Sparhawk: Yes, they're recent commits. I also have "Keep my email address private" checked at github.com/settings/emails . I recommend contacting GitHub support, they respond quickly. Let me know the result!Foxhole
I just received a reply that is the same as what you said. In order to use the private email address for contributions, you need to enable it. You can do that by checking the "Keep my email address private" box. I actually can't remember if I did that first, or if that matters, but I was pretty sure I did. Anyway, I've used a "real" address now, and I'm not going to try and git filter to test again! If others are having problems, as I mentioned above, a "real-sounding" email address might suffice. (+1 for the follow up)Georgeannageorgeanne
But how do I find the "invalid email" that the error tells me about? So If it's an old email address, I can add it to my account.Foeman

© 2022 - 2024 — McMap. All rights reserved.