I haven’t tried to see what can be done using the rails console, but if you have a personal access token with api access for a user with admin privileges it’s quite easy. (The following is based on some notes I made when I tried) It’s just two commands that you have to execute on the new runner se… Answer from grove on forum.gitlab.com
🌐
GitLab
docs.gitlab.com › runner › register
Registering runners | GitLab Docs
To ensure minimal disruption to your automation workflow, the legacy-compatible registration process triggers if a runner authentication token is specified in the legacy parameter --registration-token. The legacy-compatible registration process ignores the following command-line parameters. These parameters can only be configured when a runner is created in the UI or with the API.
Discussions

continuous integration - Where to obtain the token to register a GitLab runner? - DevOps Stack Exchange
In this link it is wrriten that I can get the token from CI/CD -> settings but CI/CD does not have a settings option. Also, in the registration instruction in step 2, it is written: Please enter the gitlab-ci coordinator URL but there is no documentation anywhere about what is this URL ... For a specific GitLab runner ... More on devops.stackexchange.com
🌐 devops.stackexchange.com
Question about ways to register GitLab Runner using Runner Authentication tokens.
You can use new runner registration workflow. It is pretty straight-forward. We've already switched to it. Here is the link: https://docs.gitlab.com/ee/ci/runners/new_creation_workflow.html#the-new-runner-registration-workflow Basically, you can create repository access token and use it to create runner and retrieve runner authentication token. Then use this token to authenticate and register the runner. More on reddit.com
🌐 r/gitlab
4
1
September 8, 2024
Obtaining a "gitlab runner token" - Stack Overflow
I a gitlab repository that I would like to set up a gitlab runner for. In the documentation it states that I need to register the runner using the "registration token" from the gitlab web... More on stackoverflow.com
🌐 stackoverflow.com
Generate Runner's authentication token using gitlab-rails
There is a way to generate a Runner’s registration token using gitlab-rails: gitlab-rails runner "token = Gitlab::CurrentSettings.current_application_settings.runners_registration_token; puts token" Similarly I’m looking for a way to generate Runner’s authentication token as well? More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
July 8, 2024
🌐
GitLab
docs.gitlab.com › ci › runners › new_creation_workflow
Migrating to the new runner registration workflow | GitLab Docs
Authentication tokens have the prefix, glrt-. To ensure minimal disruption to your automation workflow, legacy-compatible registration processing triggers if a runner authentication token is specified in the legacy parameter --registration-token.
🌐
Readthedocs
codechecker.readthedocs.io › en › latest › gitlab_integration
1. Install/register GitLab Runner - CodeChecker
Once GitLab Runner is installed and you get the token, you need to register the runner with GitLab. You can use the following command: sudo gitlab-runner register \ --non-interactive \ --url "https://mycompany.gitlab.com" \ --registration-token "<REGISTRATION_TOKEN_FROM_GITLAB>" \ --description ...
🌐
Medium
medium.com › marionete › registering-gitlab-runners-programmatically-with-an-authentication-token-a-tutorial-eaa8aa6cbc0d
Registering Gitlab Runners programmatically with an Authentication Token: A Tutorial | by joaogmartins | Marionete | Medium
April 2, 2024 - Up till now, GitLab offered the ability to register Runners with registration tokens. However, GitLab has recently deprecated this method in favor of authentication tokens. This shift aims to maintain ownership records for Runners, while also allowing authentication tokens to be reused, thanks to the addition of a unique system ID on the Runners.
Find elsewhere
🌐
GitLab
docs.gitlab.com › tutorials › automate_runner_creation
Tutorial: Automate runner creation and registration | GitLab Docs
The instructions in this tutorial describe runner creation and registration with runner authentication tokens, which have replaced the deprecated registration method that uses registration tokens.
🌐
GitLab
docs.gitlab.com › runner › commands
GitLab Runner commands | GitLab Docs
This question can be pre-filled by adding arguments when invoking the registration command: gitlab-runner register --name my-runner --url "http://gitlab.example.com" --token my-authentication-token
🌐
GitLab
docs.gitlab.com › api › runners
Runners API | GitLab Docs
Register the runner by using the GitLab API with a registration token to receive an authentication token.
🌐
Reddit
reddit.com › r/gitlab › question about ways to register gitlab runner using runner authentication tokens.
r/gitlab on Reddit: Question about ways to register GitLab Runner using Runner Authentication tokens.
September 8, 2024 -

Hello. Since gitlab-runner registration using Runner Registration tokens is getting deprecated and I saw that registration using Runner Authentication tokens is the new way, I have got a question to ask. Do I understand correctly that there are only two ways to retrieve the Runner Authentication token (according to documentation: https://docs.gitlab.com/runner/register/ ) ?

  1. Either when clicking create new runner using GitLab GUI and then copying the token when it is shown for limited time;

  2. Or if I do not manage to copy it I can still find it in the `config.toml` file.

Just wanted to make sure there are no other way to retrieve this token.

🌐
Stack Overflow
stackoverflow.com › questions › 69210123 › obtaining-a-gitlab-runner-token
Obtaining a "gitlab runner token" - Stack Overflow
docs.gitlab.com/runner/register Obtain a token: ... For a project-specific runner, go to Settings > CI/CD and expand the Runners section. Let gitlab-runner register edit config.toml, don't do it by hand.
🌐
GitLab
gitlab.com › gitlab.org › #380872
Deprecation - Support for registration tokens and server-side runner configuration parameters in `gitlab-runner register` command (#380872) · Issues · GitLab.org / GitLab · GitLab
October 31, 2022 - For guidance on the overall deprecations, removals and breaking changes workflow, please visit Breaking changes, deprecations, and removing features ...
🌐
Medium
medium.com › @sathishyellanty › upgrading-from-gitlab-runner-runner-registration-tokens-fc9f52cc45a8
Upgrading from GitLab Runner runner registration tokens. | by Sathish Yellanty | Medium
May 15, 2024 - A new runner creation workflow that uses runner authentication tokens to register runners.The legacy workflow that uses registration tokens is deprecated and will be removed in GitLab 18.0.
🌐
Terraform Registry
registry.terraform.io › providers › rsrchboy › gitlabci › latest › docs › guides › registering-a-runner
Registering a runner | Guides | rsrchboy/gitlabci | Terraform | Terraform Registry
Registering a GitLab Runner relies on a "registration token". This token is not tied to any specific user or group, but rather to the entity the runner is being registered to: a project, group, or instance.
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Generate Runner's authentication token using gitlab-rails - GitLab CI/CD - GitLab Forum
July 8, 2024 - There is a way to generate a Runner’s registration token using gitlab-rails: gitlab-rails runner "token = Gitlab::CurrentSettings.current_application_settings.runners_registration_token; puts token" Similarly I’m looki…
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Gitlab 16.x - Get authentication token for registering new runners via API - GitLab CI/CD - GitLab Forum
July 11, 2023 - Hi, with GitLab 16.x the “registration token” for registering new runners is now deprecated and a new “authentication token” was introduced: Migrating to the new runner registration workflow | GitLab As the documentation says, to register a single new runner, the Gitlab UI must be used to generate the authentication token for it...
🌐
GitLab
docs.gitlab.com › security › tokens
GitLab token overview | GitLab Docs
You can use the runners API to ... configuration arguments is considered legacy and is not recommended. Use the runner creation workflow to generate an authentication token to register runners....
🌐
GitLab
docs.gitlab.com › runner
GitLab Runner | GitLab Docs
sequenceDiagram participant GitLab participant GitLabRunner participant Executor opt registration GitLabRunner ->>+ GitLab: POST /api/v4/runners with registration_token GitLab -->>- GitLabRunner: Registered with runner_token end loop job requesting and handling GitLabRunner ->>+ GitLab: POST /api/v4/jobs/request with runner_token GitLab -->>+ GitLabRunner: job payload with job_token GitLabRunner ->>+ Executor: Job payload Executor ->>+ GitLab: clone sources with job_token Executor ->>+ GitLab: download artifacts with job_token Executor -->>- GitLabRunner: return job output and status GitLabRunner -->>- GitLab: updating job output and status with job_token end
🌐
Debops
docs.debops.org › en › master › ansible › roles › gitlab_runner › getting-started.html
Getting started — DebOps v3.2.0-218-gb575240 documentation
Personal API access tokens are created for specific GitLab user accounts and shouldn't be shared in the Ansible inventory or secrets managed by the debops.secret Ansible role. The debops.gitlab_runner role checks the $GITLAB_API_TOKEN environment variable on the Ansible Controller to get the token string and use it for registration.