Permission denied with shell when running with gitlab-runner start, working with gitlab-runner run
I'm running Ubuntu 14.04 LTS with Gitlab CI Multi Runner v0.6.2
This is my .gitlab-ci.yml
:
staging:
type: deploy
script:
- apt-get update -qy
- apt-get install -y nodejs
- npm install -d
only:
- master
production:
type: deploy
script:
- apt-get update -qy
- apt-get install -y nodejs
- npm install -d
only:
- tags
and my /etc/gitlab-runner/config.toml
concurrent = 1
[[runners]]
url = "URL_GOES_HERE"
token = "TOKEN_GOES_HERE"
name = "RUNNER_NAME"
executor = "shell"
shell = "bash"
privileged = true
[runners.ssh]
[runners.docker]
image = ""
privileged = false
[runners.parallels]
base_name = ""
When I start the CI with gitlab-runner start
as root, running commands such as apt-get update -qy
gives me a Permission denied
error, which results in the following message:
ERROR: Build failed with: exit status 1
When I start the runner with gitlab-runner run
, though, (both with --debug
and without it) everything runs perfectly.
I already have added the gitlab-runner
user to the root group and sudoers file, but without any results.