GitHub access token

September 12, 2026 ยท View on GitHub

pinact calls GitHub REST API to get commit hashes and tags. You can pass GitHub Access token via environment variable PINACT_GITHUB_TOKEN or GITHUB_TOKEN. If no GitHub Access token is passed, pinact calls GitHub REST API without access token. About GitHub Enterprise Server, see also GitHub Access Token for GHES.

Manage GitHub Access token using ghtkn

pinact >= v3.8.0

You can obtain a GitHub App User Access Token by ghtkn integration. About ghtkn, please see the document of ghtkn. As the document of ghtkn describes, the integration is enabled by default if the configuration file ghtkn.yaml exists, but pinact has the specific PINACT_GHTKN environment variable to disable it.

Manage GitHub Access token using Keyring

pinact >= v3.1.0

You can manage a GitHub Access token using secret store such as Windows Credential Manager, macOS Keychain, and GNOME Keyring.

  1. Configure a GitHub Access token by pinact token set command:
$ pinact token set
Enter a GitHub access token: # Input GitHub Access token

or you can also pass a GitHub Access token via standard input:

echo "<github access token>" | pinact token set --stdin
  1. Enable the feature by setting the environment variable PINACT_KEYRING_ENABLED:
export PINACT_KEYRING_ENABLED=true

Note that if the environment variable GITHUB_TOKEN is set, this feature gets disabled.

You can remove a GitHub Access token from keyring by pinact token rm command:

pinact token rm