Skip to main content
aspect github token mints a short-lived token from the Aspect Workflows GitHub App for one repository and prints it to stdout. Use it when a script or CI step needs to call the GitHub API, and you’d rather not store a personal access token:
  • Post from a pipeline: comment on a pull request, set a commit status or create a check run from a deploy or release step.
  • CI hosts without a GitHub token: Buildkite and CircleCI don’t hand the job one, so this is the job’s GitHub credential.
  • Least privilege: --role narrows the token to what the step needs, and it expires on its own.
It authenticates to Aspect Cloud with your stored login, or ASPECT_API_TOKEN on CI, so the GitHub App must be installed on the repository and linked to your Aspect account. See Authenticating the Aspect CLI.

Options

Valid roles: The command fails when the App isn’t linked to your account (HTTP 404) or the login lacks access to the repository (HTTP 403). Run aspect auth login again after a 401.