Learn / GitHub Actions / ncipollo missing token
ncipollo/release-action "missing token" / 401 on release create
By Kaveh Alemi · Latchkey
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 tokenCommon 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
Set the token input to secrets.GITHUB_TOKEN.
Grant contents: write so the token can create releases.
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 }} This will hit your next GitHub Actions build too
The fix you just applied is mechanical, and nothing about it needed a human. On Latchkey managed runners this failure is detected, repaired, and the job retried automatically, so the time you just spent is not spent again. Start free - 30-day trial, no credit card required - or see how self-healing works .
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
Start free on self-healing runners
Workflow YAML breaks in ways that only show up on the runner. Latchkey runs your GitHub Actions on managed runners that detect, fix, and retry transient failures automatically. Switching is one line: change runs-on: and the rest of the workflow is untouched. Up to 70% cheaper than GitHub-hosted, with free minutes on every plan.
30-day free trial · No credit card required · Set up in minutes
Previous pages-deploy remote refNext No OIDC token request URL