Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sudo gitlab-runner result command not found but gitlab-runner only can run

My Environment is Centos 7, I just installed gitlab-runner and when I run this command as User that installing the gitlab-runner (not as root)

sudo gitlab-runner register

this will result command not found but if I run without sudo

gitlab-runner register

it runs but it shows this lines

WARNING: Running in user-mode.
WARNING: The user-mode requires you to manually start builds processing:
WARNING: $ gitlab-runner run
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...

Is anybody know how to fix this

like image 904
esthrim Avatar asked Oct 25 '25 04:10

esthrim


1 Answers

you can modify the file '/etc/sudoers', find "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin ", change it as "Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin"。

i just solved the issue by above operation.

like image 69
BruceWang Avatar answered Oct 28 '25 02:10

BruceWang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!