I have one shared GitLab runner. To verify this I run the following command:
sudo gitlab-runner list
Which shows something like this:
Runtime platform arch=amd64 os=linux pid=28276 revision=c127439c version=13.0.0
Listing configured runners ConfigFile=/etc/gitlab-runner/config.toml
Shared shell runner - 1 Executor=shell Token=5_JqpessGzXasyqRyBP5 URL=https://gitlab.mysite.com/
I have a new GitLab instance and need to re-assign the runner to the new instance. This means a new token (the URL is the same).
Solution 1
I simply ran sudo gitlab-runner verify --delete and then registed a new runner. Clearly not ideal, though it works.
Solution 2
A second solution I thought about was to go in the /etc/gitlab-runner/config.toml and change the token, but this did not work for some reason. I believe it did not work, because when I ran sudo gitlab-runner verify it failed. I guess it's possible my issue was elsewhere...?
How can I achieve this?