问题
How can I use a fake email address with Github?
Following Github's since-changed instructions, I had a fake email like user@server.fake configured with git (git config --global user.email "user@server.fake"
) 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?
回答1:
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 username@users.noreply.github.com when performing git operations and sending outgoing email on your behalf.
2. The "Keeping your email address private" help page says to use "username@users.noreply.github.com".
Change git config to username@users.noreply.github.com:
git config --global user.email "username@users.noreply.github.com"
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
username@users.noreply.github.com
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.
来源:https://stackoverflow.com/questions/22047607/github-this-email-will-not-be-used-for-commit-blame