fatal: failed to install gitlab-runner: service gitlab-runner already exists 1

fatal: failed to install gitlab-runner: service gitlab-runner already exists

Rename the init file with

sudo mv /etc/systemd/system/gitlab-runner.service  /etc/systemd/system/gitlab-runner.service.bak
and execute again

sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
cleanup the backup file

sudo rm /etc/systemd/system/gitlab-runner.service.bak

Here is what the above code is Doing:
1. It’s renaming the init file to a backup file.
2. It’s installing the gitlab-runner again.
3. It’s removing the backup file.

Similar Posts