For a command-line adventure using a script I've modified:
- Visit https://github.com/DaveJarvis/github-email
- Follow the instructions to install into
$HOME/bin. - Set your GitHub token.
- Open a new terminal.
- Run:
github-email username
The script automates using GitHub's HTTP REST API to go a bit beyond looking at GitHubfind email addresses associated with Git commit histories. The script will try findingalso look for the user's contact information from a few different sources. You could perform all the steps the script takes from within a web browser.
The key line from the script is to retrieve all commits against a particular repository (owned by the user whose email address is desired):
# Find all commits against the repository
$CMD -H "$PARAM_GITHUB_TOKEN" "$API_GITHUB/repos/$ARG_USERNAME/$ARG_REPOSITORY/commits" \
| jq -r ".[] | .commit | .author | $NAME_FORMAT" 2>/dev/null \
| sort \
| uniq