I’m working on automated self-hosted runner configuration and I have a strange case of runner’s registration exception:
Run Create registration token method of github API
Pass token from the response to config.sh
Runner authentication fails with message
Http response code: UnprocessableEntity from ‘POST https://api.github.com/repos/myorganization/myproject/actions-runners/registration’
Response status code does not indicate success: 422 (Unprocessable Entity).
An error occurred: Not configured
This error does not reproduce if I push the button Add runner from project settings before any API calls. After pushing this button runner authentication works pretty well event with tokens generated with API. For me it looks like this button also changes some flag in project settings.
Is there any logic in this behavior?