0

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 ?

1 Answer 1

0

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.

  1. gem install bundler -> you will get a Gemfile for the current directory (root of the project)

  2. put gem "fastlane" into the Gemfile

  3. 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>.

Sign up to request clarification or add additional context in comments.

2 Comments

Nemanja Fillipovic, the thing is the like for the answer which you have provided, it just shows how to use it using usermod, and usermod is not supported on macOS. But the question is being asked for macOS
@Weirdoooo as I said, I would not use sudo at all. I would use the Bundler so you do not need sudo.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.