无法安装gitlab-runner:初始化已存在

问题描述 投票:0回答:1

我通过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

如何进行?

gitlab gitlab-ci gitlab-ci-runner
1个回答
0
投票
  1. 用]重命名初始化文件>

    sudo mv /etc/systemd/system/gitlab-runner.service  /etc/systemd/system/gitlab-runner.service.bak
    
  2. 然后再次执行

  3. sudo gitlab-runner install --user=my-user --working-directory=/home/my-user
    
  4. 清理备份文件

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

    最后,您可以使用service gitlab-runner start重新开始跑步。

© www.soinside.com 2019 - 2024. All rights reserved.