Skip to content
Latchkey

ncipollo/release-action "missing token" / 401 on release create

ncipollo/release-action needs a token to call the releases API. When none is passed and the environment has none, the action errors before contacting GitHub.

What this error means

A release step using ncipollo/release-action fails with "missing token" or a 401 from the API.

github-actions
Error: missing token
##[error]Error: missing token

Common causes

No token input and no env token

The action could not find a token via the token input or GITHUB_TOKEN in the environment.

Token expired on a long job

A custom PAT expired before the release step ran, surfacing as an auth failure.

How to fix it

Pass the GITHUB_TOKEN to the action

  1. Set the token input to secrets.GITHUB_TOKEN.
  2. Grant contents: write so the token can create releases.
  3. Re-run the workflow.
.github/workflows/release.yml
permissions:
  contents: write
steps:
  - uses: ncipollo/release-action@v1
    with:
      token: ${{ secrets.GITHUB_TOKEN }}
      tag: ${{ github.ref_name }}

How to prevent it

  • Always pass token explicitly to release actions; defaults vary by action version.
  • Use GITHUB_TOKEN over a PAT unless cross-repo release is required.

Frequently asked questions

What causes ""Error: missing token""?
The action could not find a token via the token input or GITHUB_TOKEN in the environment.
How do I fix "Error: missing token"?
Pass the GITHUB_TOKEN to the action

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card