Description
When authenticating with GitHub, we are not very intelligent about which email address we use. I think it's always the primary email address, but that may not be one the user wants publicly visible. If they have privacy protection on, they may not be able to push commits until they go through the hassle of fiddling with their setup and commit authorship to switch to a publicly visible email address. In particular the parts that we directly control are the environment variables:
GIT_AUTHOR_EMAIL
GIT_AUTHOR_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_NAME
Perhaps we can do this when the user authenticates:
- See if the primary email address is publicly visible. If so, use it
- Iterate through the non-primary email addresses and pick one that is publicly visible
- If none are publicly visible, only then use the primary
Perhaps we can warn about that when it happens? Right now there's no interstitial when authenticating with GitHub, though, so we'd have to find a way to wedge that in. Probably not worth it for this band-aid. We can address this more robustly later.