Skip to content
Latchkey

Actions "Input required and not supplied: token" in CI

An action declared token as a required input and received an empty string. The most common cause is referencing a secret that is undefined or withheld (for example on a fork PR), so the expression resolves to nothing.

What this error means

A step fails immediately with "Error: Input required and not supplied: token". The action got with: token: set to an empty value.

Terminal
Error: Input required and not supplied: token

Common causes

The referenced secret is empty or missing

A secret that is not defined at this scope, or withheld on a fork PR, evaluates to an empty string passed to the required input.

The token input was never wired up

The step omits with: token: (or passes a misspelled secret), so the action falls back to nothing for a required input.

How to fix it

Pass a valid token to the action

  1. Confirm the secret exists at the right scope and name.
  2. Wire it explicitly to the action's token input.
  3. Use GITHUB_TOKEN when the action only needs repo scope.
.github/workflows/ci.yml
- uses: some/action@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

Guard the step for fork PRs

If the token is unavailable on fork PRs, skip the step there instead of letting it fail.

.github/workflows/ci.yml
- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
  uses: some/action@v1
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

How to prevent it

  • Wire required token inputs to a defined secret explicitly.
  • Confirm secret scope and name before relying on it.
  • Guard token-using steps on fork pull requests.

Frequently asked questions

What causes ""Input required and not supplied: token""?
A secret that is not defined at this scope, or withheld on a fork PR, evaluates to an empty string passed to the required input.
How do I fix "Input required and not supplied: token"?
Pass a valid 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