I have installed gitlab-runner
on a new OSX device. My runner is register and launch correctly.
But when i start a job, I have this error
sudo gem install fastlane
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
What can I do avoid this error and let gitlab-runner have sudo access to execute anything?
Most probably you granted the sudo permission to your gitlab-runner
user, but you did not remove the password restriction for sudo for the gitlab-runner
user. Here you can find how to do it.
However I would not recommend using sudo. You could use Bundler and then install fastlane with bundler for this project and not globally.
gem install bundler
-> you will get a Gemfile for the current directory (root of the project)
put gem "fastlane"
into the Gemfile
install it with bundle install
(you can run this command with your gitlab-runner
user in jobs)
For running fastlane lanes use: bundle exec fastlane <name_of_the_lane>
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.