RUNNER_TOKEN_EXPIRED
cicd
auth_error
ai_generated
true
错误:运行器注册令牌已过期。请生成新令牌并重新注册运行器。
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
85%修复率
88%置信度
1证据数
2023-08-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| GitHub Actions runner v2.311.0 | active | — | — | — |
| Ubuntu 22.04 runner image | active | — | — | — |
根因分析
GitHub Actions 自托管运行器注册令牌在1小时后过期,如果令牌未刷新,运行器无法与GitHub进行身份验证。
English
GitHub Actions self-hosted runner registration token expires after 1 hour, and the runner cannot authenticate with GitHub if the token is not refreshed.
官方文档
https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners解决方案
-
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
-
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
无效尝试
常见但无效的做法:
-
Restart the runner service without re-registering
95% 失败
Restarting does not refresh the expired token; authentication still fails
-
Delete and recreate the runner in GitHub UI without generating a new token
80% 失败
The same expired token is reused; the runner still cannot connect
-
Update the runner version only
90% 失败
The token is independent of runner version; updating version does not fix token expiry