esthrim
esthrim

Reputation: 2130

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

Upvotes: 4

Views: 16727

Answers (2)

BruceWang
BruceWang

Reputation: 175

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.

Upvotes: 5

esthrim
esthrim

Reputation: 2130

I uninstalled and installed the gitlab-runner using yum install following this instruction

Upvotes: 4

Related Questions