GitHub Actions Self-Hosted Runner Registration Failed (config.sh)
Running config.sh to register a self-hosted runner fails because the registration token expired, the repo/org URL or scope is wrong, or the account lacks permission to add runners.
What this error means
config.sh exits with an authorization or token error and the runner never appears under Settings > Actions > Runners.
Http response code: NotFound from 'POST .../actions/runner-registration'
# or
Invalid registration token. Tokens expire after one hour.Common causes
Expired or wrong registration token
Registration tokens are short-lived (about an hour). Using a stale token, or a token for a different scope, fails registration.
Wrong URL or insufficient permission
The --url must match the repo or org you intend, and the account/token needs admin rights to add runners at that scope.
How to fix it
Use a fresh token and correct URL
Generate a current registration token for the right scope and run config.sh with the matching URL.
./config.sh \
--url https://github.com/my-org/my-repo \
--token <FRESH_REGISTRATION_TOKEN> \
--labels self-hosted,linux,x64Check scope and permissions
- Generate the token at the same scope (repo vs org vs enterprise) as the --url.
- Ensure the user/token has admin permission to manage runners there.
- For automation, mint registration tokens via the API right before config.sh runs.
How to prevent it
- Generate a fresh registration token immediately before registering.
- Match the --url scope to where the token was created.
- Automate token minting so runners never use stale tokens.