cicd
auth_error
ai_generated
true
ERROR: Registration token is expired. Please generate a new registration token on the GitLab admin area.
ID: cicd/gitlab-ci-runner-registration-token-expired
92%Fix Rate
84%Confidence
1Evidence
2024-04-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| GitLab 16.8 | active | — | — | — |
| GitLab Runner 16.7.0 | active | — | — | — |
Root Cause
The GitLab Runner registration token used to register the runner has expired, typically due to a token rotation policy or manual revocation in GitLab settings.
generic中文
用于注册运行器的 GitLab Runner 注册令牌已过期,通常是由于令牌轮换策略或在 GitLab 设置中手动撤销。
Official Documentation
https://docs.gitlab.com/runner/register/Workarounds
-
95% success Generate a new registration token from GitLab admin area: go to Admin > CI/CD > Runners, click 'Register a runner', copy the new token. Then re-register the runner: `sudo gitlab-runner unregister --name my-runner && sudo gitlab-runner register --url https://gitlab.com --registration-token NEW_TOKEN --non-interactive --executor docker --description my-runner`.
Generate a new registration token from GitLab admin area: go to Admin > CI/CD > Runners, click 'Register a runner', copy the new token. Then re-register the runner: `sudo gitlab-runner unregister --name my-runner && sudo gitlab-runner register --url https://gitlab.com --registration-token NEW_TOKEN --non-interactive --executor docker --description my-runner`.
-
85% success If using GitLab CI/CD variables, update the `CI_REGISTRATION_TOKEN` variable in the project or group settings with the new token, then trigger a pipeline that re-registers the runner automatically.
If using GitLab CI/CD variables, update the `CI_REGISTRATION_TOKEN` variable in the project or group settings with the new token, then trigger a pipeline that re-registers the runner automatically.
中文步骤
Generate a new registration token from GitLab admin area: go to Admin > CI/CD > Runners, click 'Register a runner', copy the new token. Then re-register the runner: `sudo gitlab-runner unregister --name my-runner && sudo gitlab-runner register --url https://gitlab.com --registration-token NEW_TOKEN --non-interactive --executor docker --description my-runner`.
If using GitLab CI/CD variables, update the `CI_REGISTRATION_TOKEN` variable in the project or group settings with the new token, then trigger a pipeline that re-registers the runner automatically.
Dead Ends
Common approaches that don't work:
-
95% fail
The token is stored in the runner's config.toml and is expired on the server side; restarting does not refresh it.
-
80% fail
Manually editing the token without proper registration can cause authentication failures; GitLab expects the token to be generated and associated with a specific runner.