gpt4 book ai didi

gitlab - “gitlab-runner”意外地以 root 身份运行

转载 作者:行者123 更新时间:2023-12-02 13:25:44 25 4
gpt4 key购买 nike

我是 iOS 上持续集成的新手,我尝试使用 gitlab-runner 运行构建并使用 shell 作为执行器,但我遇到了 pod 无法以 root 身份运行的问题 我确信我我没有使用 sudo 安装 cocoapods,我尝试在 before_script 运行 whoami ,这就是我的运行者以 root 身份运行 enter image description here

如何使 gitlab-runner 不以 root 身份运行?

最佳答案

在没有 sudo 的情况下注册运行器,这应该将 gitlab-runner 设置为以当前用户身份运行。

所以步骤应该是:

sudo curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64

sudo chmod +x /usr/local/bin/gitlab-runner

gitlab-runner register ...

gitlab-runner install

请记住停止您的 sudo gitlab-runner 服务,否则您可能会在同一台机器上有多个运行程序争夺相同的作业。

关于gitlab - “gitlab-runner”意外地以 root 身份运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49004853/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com