我通过sudo apt install gitlab-runner
安装了gitlab-runner,并根据the tutorial对其进行了配置,并且运行良好。
现在,我想更改gitlab-runner的用户。因此,我用service gitlab-runner stop
停止了服务,并尝试通过
sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
我收到以下错误消息:
致命:无法安装gitlab-runner:初始化已存在:/etc/systemd/system/gitlab-runner.service
如何进行?
用]重命名初始化文件>
sudo mv /etc/systemd/system/gitlab-runner.service /etc/systemd/system/gitlab-runner.service.bak
然后再次执行
sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
清理备份文件
sudo rm /etc/systemd/system/gitlab-runner.service.bak
最后,您可以使用service gitlab-runner start
重新开始跑步。