Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save deksoke/0d40b1d2d5b4c5329c58c39ed38ef1c9 to your computer and use it in GitHub Desktop.
Save deksoke/0d40b1d2d5b4c5329c58c39ed38ef1c9 to your computer and use it in GitHub Desktop.
sudo: gitlab-runner: command not found

REF https://docs.gitlab.com/runner/install/


For RHEL/CentOS/Fedora

curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh | sudo bash
yum list gitlab-runner --showduplicates | sort -r // show all version.
yum install gitlab-runner
yum install gitlab-runner-{13.0.2-1}

OR

curl -LJO https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{abc}.rpm
curl -LJO https://gitlab-runner-downloads.s3.amazonaws.com/v13.0.0/rpm/gitlab-runner_amd64.rpm. // for version

rpm -i gitlab-runner_{abc}.rpm

ln -s /usr/local/bin/gitlab-runner /usr/bin/gitlab-runner

If manually build, you need add /usr/local/bin to secure_path


cat /etc/sudoers

#Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
## Next comes the main part: which users can run what software on 
## which machines (the sudoers file can be shared between multiple
## systems).

echo "gitlab-runner ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment