如何解决Gitlab-ci-管道无法运行
当我尝试运行管道时出现以下错误
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-runner权限有关吗?我尝试给予它完全访问权限,但仍然失败。有人可以帮我吗?
我正在gitlab上提到的指南 https://docs.gitlab.com/runner/install/linux-manually.html
Gitlab Runner 版本:13.4.1 Git修订版:e95f89a0 Git分支:13-4-稳定 GO版本:go1.13.8 内置:2020-09-25T20:03:43 + 0000 操作系统/ Arch:linux / amd64
Ubuntu 发行人ID:Ubuntu 说明:Ubuntu 20.04.1 LTS 发行:20.04 代号:focus
解决方法
我似乎找到了解决方法。
由{em> @ maksim.danilin 于https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2126
- 从/ home / gitlab-runner的
.*
个文件中删除所有文件
如果您位于gitlab-runner文件夹中, -
rm *
应该可以解决问题
Futhermore通过 @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:全部
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。