This script retrieves a user's email address from various sources, including: GitHub, GitHub commits, GitHub repository activity, and NPM.
Install the following software packages:
Install the script using any method described in this section.
Install the script using npm as follows:
npm install --global github-email
Install the script for the local account as follows:
mkdir -p $HOME/bin
cd $HOME/bin
wget https://raw.githubusercontent.com/DaveJarvis/github-email/master/github-email.sh
chmod +x github-email.sh
If the GITHUB_TOKEN
environment variable is not set, the script will ask
the user to generate an authenicated API token and use it. Generate an
authenticated API token as follows:
- Visit https://github.com/settings/tokens/new?description=github-email
- Click Generate Token.
- Copy the token.
- Run the script.
- Follow the instructions.
This will save a copy of the token in $HOME/.ghtoken
.