Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about token to use #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,7 +34,7 @@ check_interval = 0
[[runners]]
name = "docker-machine"
url = "https://gitlab.com"
token = "your-token"
token = "<authentication_token>"
executor = "docker+machine"
[runners.docker]
tls_verify = false
Expand Down