paulirish / github-email

Get a GitHub user's email. :sunglasses: Use this responsibly.
https://www.npmjs.com/package/github-email
997 stars 110 forks source link

GH_EMAIL_TOKEN exists in env but it's ignored #27

Closed zeke closed 8 months ago

zeke commented 8 months ago

Hey @paulirish long time no see. 👋🏼

Just took this for a spin but it appears to be ignoring the GitHub token:

$ echo $GH_EMAIL_TOKEN 
ghp_{REDACTED}
$ npx github-email zeke

Email on GitHub
   Github requires authenticated API requests to retrieve the email. See: https://git.io/vxctz
   To enable, open https://github.com/settings/tokens/new?description=github-email …
   Keep the checkboxes unchecked, hit 'Generate token', copy the token, then run this in your shell:
       export GH_EMAIL_TOKEN=<token>
   You'll also want to add that line to your shell configuration (e.g. .bashrc)

Email on npm
null

Emails from recent commits

Emails from owned-repo recent activity
$ npm i -g github-email
$ github-email zeke

Email on GitHub
   Github requires authenticated API requests to retrieve the email. See: https://git.io/vxctz
   To enable, open https://github.com/settings/tokens/new?description=github-email …
   Keep the checkboxes unchecked, hit 'Generate token', copy the token, then run this in your shell:
       export GH_EMAIL_TOKEN=<token>
   You'll also want to add that line to your shell configuration (e.g. .bashrc)

Email on npm
null

Emails from recent commits

Emails from owned-repo recent activity
zeke commented 8 months ago

False alarm! Never mind! PEBCAK.

I was doing GH_EMAIL_TOKEN=ghp_foo instead of export GH_EMAIL_TOKEN=ghp_. So it was showing up in my shell but unavailable to the script.