Forrest logo
back to the gitlab-runner tool

gitlab-runner:tldr:e927c

gitlab-runner: Register a runner with a Docker executor.
$ sudo gitlab-runner register --url ${https:--gitlab-example-com} --registration-token ${token} --name ${name} --executor ${docker}
try on your machine

This command is used to register a GitLab runner with the specified URL, registration token, name, and executor.

Here is how each part of the command is explained:

  • sudo: This is a command in Unix-like operating systems that allows a user with administrative privileges to execute a command as the superuser (root user). It is used here to give the necessary permissions for registering the GitLab runner.

  • gitlab-runner: This is the command-line interface for managing and interacting with GitLab runners.

  • register: This subcommand is used to register a new GitLab runner.

  • --url: This option specifies the URL of the GitLab instance. In this case, the URL is ${https:--gitlab-example-com}. It is recommended to replace ${https:--gitlab-example-com} with the actual URL of your GitLab instance.

  • --registration-token: This option is used to provide the registration token required to register the runner with GitLab. In this case, the token is ${token}. You should replace ${token} with the actual registration token provided by your GitLab instance.

  • --name: This option sets the name of the runner. In this case, the name is ${name}. Replace ${name} with the desired name for your runner.

  • --executor: This option specifies the executor type for the runner. In this case, the executor type is ${docker}. Replace ${docker} with the desired executor type. For example, you can use shell for a shell executor or docker for a Docker executor.

Overall, this command registers a new GitLab runner with the specified URL, registration token, name, and executor. Make sure to replace the variables ${https:--gitlab-example-com}, ${token}, ${name}, and ${docker} with their actual values specific to your GitLab setup.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the gitlab-runner tool