I get the following error when i try to run the pipeline
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
Has this got something to do with gitlab-runner permissions? I have tried giving it full access, but still it fails. Can someone help me out?
I am following the guide mentioned on gitlab at https://docs.gitlab.com/runner/install/linux-manually.html
Gitlab Runner Version: 13.4.1 Git revision: e95f89a0 Git branch: 13-4-stable GO version: go1.13.8 Built: 2020-09-25T20:03:43+0000 OS/Arch: linux/amd64
Ubuntu Distributor ID: Ubuntu Description: Ubuntu 20.04.1 LTS Release: 20.04 Codename: focal
I seemed to have found a workaround.
as answered by @maksim.danilin on https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2126
.*
files from /home/gitlab-runnerrm *
should do the trick if you are inside gitlab-runner folderFuthermore follow the solution by @Reactgular (How to use sudo in build script for gitlab ci?)
gitlab-runner
user
$ sudo usermod -a -G sudo gitlab-runner
$ sudo visudo
Just an additional information if the error is showing as "command not found " . Ensure you have /usr/local/bin/ in $PATH for root or you might get a command not found error. Alternately, you can install gitlab-runner in a different location, like /usr/bin/.
just check
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
I have documented gitlab runner setup. Feel free to refer! https://github.com/edureka2021/gitlab.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With