I'm having an issue when trying to use the gitlab runner I installed in my centos 8 server.
So here are the details:
I followed the instructions here to install: https://docs.gitlab.com/runner/install/linux-manually.html
I downloaded and installed their rpm package then ran it and registered it, using the shell
executor
So far so good.
The issue is that when the runner tries to run a pipeline, I get this error:
ERROR: Job failed (system failure): Failed to start process: exec: "su": executable file not found in $PATH
There is a similar issue with the runner on nixOS, apparently, but I'm unsure how I would apply the workaround.
https://github.com/NixOS/nixpkgs/issues/53985
So I'm unsure whether I messed something up during install at some point or not; and whether I can fix it or apply a workaround, but any help would be appreciated.
Thanks.
Best Answer
Maybe SELinux is enabled by default.
Test with
getenforce
orsealert -a /var/log/audit/audit.log
on gitlab-runnerThat was my Problem with RHEL8 and gitlab-runner.
You can temporary disable SELinux with
setenforce 0
and try to run CI/CD job again.After disabling SELinux or adding the missing rules it works fine for me.