From d5c21099bb3f728423d391b348a8166071e3f30b Mon Sep 17 00:00:00 2001 From: jawabuu <49921621+jawabuu@users.noreply.github.com> Date: Thu, 5 Aug 2021 21:36:48 +0300 Subject: [PATCH] Add note about token to use --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f9c961..0b197ce 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,18 @@ See the example `config.toml` and `docker-compose.yaml` below for the hetzner sp Use [this image](https://hub.docker.com/r/mawalu/hetzner-gitlab-runner) instead of the `gitlab/gitlab-runner` image and set `MachineDriver` to `hetzner` in your runner configuration. +From [Gitlab](https://docs.gitlab.com/ee/api/runners.html) +> There are two tokens to take into account when connecting a runner with GitLab. + `registration_token` - Token used to register the runner. It can be obtained through GitLab. + `authentication_token` - Token used to authenticate the runner with the GitLab instance. + +The `config.toml` uses the authentication_token which can be obtained by running; +``` +curl --request POST "https://gitlab.com/api/v4/runners" --form "token=df5T4Zxfod71HbWchyuc" + +{"id":10,"token":"Z9sHakc9KtEg2H-2S47A"} +``` + Example `config.toml`: ```toml @@ -22,7 +34,7 @@ check_interval = 0 [[runners]] name = "docker-machine" url = "https://gitlab.com" - token = "your-token" + token = "" executor = "docker+machine" [runners.docker] tls_verify = false