Description
Since Gitlab 16.0 there is a new way to create Gitlab Runners (https://docs.gitlab.com/security/tokens/#runner-authentication-tokens). The old way is deprecated and some gitlab instances have it disabled by the admin. The new way is not yet implemented in gitlab4j.
The endpoint to create a gitlab runner is in the UsersApi: POST /user/runners https://docs.gitlab.com/api/users/#create-a-runner-linked-to-a-user.
Here is the UserApi in gitlab4j: https://github.com/gitlab4j/gitlab4j-api/blob/main/gitlab4j-api/src/main/java/org/gitlab4j/api/UserApi.java.
Here some details how the old and new way work when you want to create a new group runner:
Old way: You go to the group page and copy the registration token, that is the same for every runner in the group. You use the gitlab runner cli to register the runner with that registration token and provide all metadata in the runner (tags, description, ...). The cli will generate a runner token and throw that in the config.toml.
New way: From the group page you create a new gitlab runner. You get a token that is unique for the runner. You provide the metadata in the ui. The gitlab runner cli is not needed. You just add the token in your gitlab runner config.toml.