The gitlab-runner is saved at '/usr/local/bin/gitlab-runner'. 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"