Gitlab-ci - 管道无法 运行
Gitlab-ci - Pipeline Fails to run
当我尝试 运行 管道
时出现以下错误
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
这是否与 gitlab-运行ner 权限有关?我试过给它完全访问权限,但仍然失败。有人可以帮我吗?
我正在按照 gitlab 上提到的指南进行操作
https://docs.gitlab.com/runner/install/linux-manually.html
Git实验室亚军
版本:13.4.1
Git 修订版:e95f89a0
Git 分支:13-4-稳定
GO版本:go1.13.8
内置:2020-09-25T20:03:43+0000
OS/Arch: linux/amd64
Ubuntu
经销商编号:Ubuntu
说明:Ubuntu 20.04.1 LTS
发布:20.04
代号:focal
我似乎找到了解决方法。
@maksim.danilin 在 https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2126
上的回答
- 从 /home/gitlab-runner
中删除 .*
个文件中的所有文件
rm *
如果你在 gitlab-runner 文件夹中,应该可以解决问题
进一步遵循 @Reactgular (How to use sudo in build script for gitlab ci?)
的解决方案
- 授予
gitlab-runner
用户 sudo 权限
$ sudo usermod -a -G sudo gitlab-runner
- 取消 gitlab-runner 用户的 sudo 密码限制
$ sudo visudo
- 将以下内容添加到文件底部
- gitlab-runner ALL=(ALL) NOPASSWD: ALL
当我尝试 运行 管道
时出现以下错误sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
这是否与 gitlab-运行ner 权限有关?我试过给它完全访问权限,但仍然失败。有人可以帮我吗?
我正在按照 gitlab 上提到的指南进行操作 https://docs.gitlab.com/runner/install/linux-manually.html
Git实验室亚军 版本:13.4.1 Git 修订版:e95f89a0 Git 分支:13-4-稳定 GO版本:go1.13.8 内置:2020-09-25T20:03:43+0000 OS/Arch: linux/amd64
Ubuntu 经销商编号:Ubuntu 说明:Ubuntu 20.04.1 LTS 发布:20.04 代号:focal
我似乎找到了解决方法。
@maksim.danilin 在 https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2126
上的回答- 从 /home/gitlab-runner 中删除
rm *
如果你在 gitlab-runner 文件夹中,应该可以解决问题
.*
个文件中的所有文件
进一步遵循 @Reactgular (How to use sudo in build script for gitlab ci?)
的解决方案- 授予
gitlab-runner
用户 sudo 权限$ sudo usermod -a -G sudo gitlab-runner
- 取消 gitlab-runner 用户的 sudo 密码限制
$ sudo visudo
- 将以下内容添加到文件底部
- gitlab-runner ALL=(ALL) NOPASSWD: ALL