# GitHub Actions: Error: Input required and not supplied: token

**Code:** `Input required and not supplied` · **Category:** CI/CD · **Seen on:** GitHub Actions

An action needs an input (token, ssh-key, api-key…) and the `with:` value is empty or missing — often because the secret does not exist.

## Meaning

The message names the missing input. The value usually comes from `${{ secrets.NAME }}`; if the secret is not defined, spelled differently, scoped to another environment or not available on forks, GitHub substitutes an empty string and the action fails. Check names and scopes first.

## Common causes

- Secret not created, or created in another repository/environment
- Secret name differs (case-sensitive) from the reference
- Run triggered by a fork or Dependabot (secrets withheld)
- Wrong input name for that action version
- Reusable workflow not receiving the secret (`secrets: inherit` missing)

## Quick fix

1. Check Settings → Secrets and variables for the exact name
2. Compare the `with:` key with the action's README for your version
3. For reusable workflows pass secrets explicitly or use `secrets: inherit`

## Detailed fix by platform

### GitHub Actions

1. Debug without printing the secret: `run: test -n "$X" && echo set
2. echo MISSING` with `env: X: ${{ secrets.NAME }}`

## Code examples

### Pass the input from a secret

```yaml
- uses: peaceiris/actions-gh-pages@v4
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}     # built in, always defined
    deploy_key: ${{ secrets.DEPLOY_KEY }}         # must exist in Settings → Secrets
```

## How to diagnose

1. **Name** — Exact secret and input names?
2. **Scope** — Repo, environment or organization secret?
3. **Origin** — Fork or Dependabot run?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-input-required-not-supplied)
