Skip to content

GitHub Token ​

A GitHub token is optional. LemonUp works without one.

Without a token, GitHub allows 60 requests an hour from your internet connection. Checking, installing and updating GitHub addons uses some of them, and so does the daily look for a newer LemonUp. With a token, the limit is 5,000 requests an hour.

You might want one if:

  • you keep many addons from GitHub
  • you check for updates often, or across several games
  • LemonUp says "GitHub's limit of 60 requests an hour is used up."
  • other people or apps on your network also use GitHub

The token LemonUp needs has no permissions. It can only read public repositories, which is all LemonUp does on GitHub.

Make a Token ​

  1. Sign in to GitHub and open New fine-grained personal access token. (From any GitHub page: your profile picture, Settings, Developer settings, Personal access tokens, Fine-grained tokens, Generate new token.)
  2. Token name: LemonUp.
  3. Expiration: choose Custom and pick a date a year from today. Any length works; see When It Expires.
  4. Repository access: choose Public repositories.
  5. Permissions: add none.
  6. Click Generate token.
  7. Copy the token. It starts with github_pat_. GitHub shows it only on this page.

A classic token with no scopes works too.

Add It to LemonUp ​

  1. Open LemonUp and press s on your addon list to open Settings.
  2. Choose GitHub token under "For all games" and press Enter.
  3. Paste the token and press Enter to save it.

The token is saved in shared.toml and is used by every game. Settings shows "Saved" in its place, and LemonUp never prints it. To remove it, empty the box and press Enter.

Environment Variable ​

LemonUp also reads a token from GITHUB_TOKEN, or GH_TOKEN if that isn't set. A token saved in Settings is used instead of either.

bash
GITHUB_TOKEN=github_pat_... lemonup check

When It Expires ​

GitHub turns the token off on its expiration date. LemonUp then says "GitHub didn't accept your GitHub token. Check it in Settings." Make a new token, then paste it in Settings in place of the old one.

GitHub also turns off a token that goes unused for a year.

Keeping It Safe ​

On Linux and macOS, shared.toml is readable only by your user. Because the token has no permissions, someone who copies it can only read public repositories with your limit. To stop a token, delete it on GitHub's Fine-grained tokens page.

Released under the MIT License.