# Error: The runner registration token has expired. Please generate a new token and re-register the runner.

- **ID:** `cicd/github-actions-self-hosted-runner-token-expired`
- **Domain:** cicd
- **Category:** auth_error
- **Error Code:** `RUNNER_TOKEN_EXPIRED`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

GitHub Actions self-hosted runner registration token expires after 1 hour, and the runner cannot authenticate with GitHub if the token is not refreshed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| GitHub Actions runner v2.311.0 | active | — | — |
| Ubuntu 22.04 runner image | active | — | — |

## Workarounds

1. **Generate a new registration token from GitHub Settings > Actions > Runners > Remove runner > Add runner, then re-run the configure script with the new token:
./config.sh --url https://github.com/your-org/your-repo --token NEW_TOKEN
./run.sh** (90% success)
   ```
   Generate a new registration token from GitHub Settings > Actions > Runners > Remove runner > Add runner, then re-run the configure script with the new token:
./config.sh --url https://github.com/your-org/your-repo --token NEW_TOKEN
./run.sh
   ```
2. **Automate token refresh using a cron job or GitHub Actions workflow that calls the API to get a new token and updates the runner configuration daily** (85% success)
   ```
   Automate token refresh using a cron job or GitHub Actions workflow that calls the API to get a new token and updates the runner configuration daily
   ```

## Dead Ends

- **Restart the runner service without re-registering** — Restarting does not refresh the expired token; authentication still fails (95% fail)
- **Delete and recreate the runner in GitHub UI without generating a new token** — The same expired token is reused; the runner still cannot connect (80% fail)
- **Update the runner version only** — The token is independent of runner version; updating version does not fix token expiry (90% fail)
