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. ... You can use a configuration template to register a runner with settings that are not supported by the register command. ... The volume for the location of the template file must be mounted on the GitLab Runner container.
Discussions

terraform - How to get Gitlab runner registration token from command line? - Stack Overflow
I'm trying to deploy a Gitlab instance and runners ready with Terraform. The script creates both Gitlab and runners without any problem, but I don't know how to register the runners automatically a... More on stackoverflow.com
🌐 stackoverflow.com
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 More on devops.stackexchange.com
🌐 devops.stackexchange.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 16.x - Get authentication token for registering new runners via API
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 ... More on forum.gitlab.com
🌐 forum.gitlab.com
0
0
July 11, 2023
🌐
GitLab
docs.gitlab.com › ci › runners › new_creation_workflow
Migrating to the new runner registration workflow | GitLab Docs
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. ... gitlab-runner register \ --non-interactive \ --executor "shell" \ --url "https://gitlab.com/" \ --tag-list "shell,mac,gdk,test" \ --run-untagged "false" \ --locked "false" \ --access-level "not_protected" \ --registration-token "REDACTED"
🌐
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. For more information, see The new runner registration workflow. GitLab Runner must be installed on your GitLab 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…
Find elsewhere
🌐
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.
🌐
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 "codechecker" \ --executor "shell"
🌐
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 create personal access tokens to authenticate with: The GitLab API. GitLab repositories. The GitLab registry.
🌐
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.
🌐
GitLab
docs.gitlab.com › ee › security › token_overview.html
GitLab Token overview
January 20, 2023 - Sign in to GitLab · Loading · By signing in you accept the Terms of Use and acknowledge the Privacy Statement and Cookie Policy · Don't have an account yet? Register now · or sign in with · Remember me · Explore Help About GitLab GitLab community forum
🌐
GitGuardian
docs.gitguardian.com › gitlab runner authentication token
GitLab runner authentication token | GitGuardian documentation
1 month ago - Summary: GitLab Runner provides a way to execute jobs defined in GitLab CI/CD pipelines. The authentication token is used to securely register the runner with the GitLab instance, allowing it to communicate and fetch job instructions securely.
🌐
GitLab
forum.gitlab.com › gitlab ci/cd
Gitlab runner token vs runner registration token (gitlab.com) - GitLab CI/CD - GitLab Forum
July 28, 2017 - ^ in title In each project’s piplines page there’s a “runner registration token” you can use to associate the runner with project. But in the /etc/gitlab-runner/config.toml there’s also an entry call “token” which I be…
🌐
GitLab
genboree.org › help
Index · Runner tokens · Blueprints · Architecture · Help · GitLab
The registration token proves that the party that registers the runner has administrative access to the instance, group, or project to which the runner is registered. This approach has worked well in the initial years, but some major known issues ...
🌐
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.

🌐
GitLab
docs.gitlab.com › user › profile › personal_access_tokens
Personal access tokens | GitLab Docs
Use personal access tokens to authenticate with the GitLab API or Git over HTTPS. Includes creation, rotation, revocation, scopes, and expiration settings.