gitlab-runner shows "Permission denied" in Pipeline
Description of the problem
I have a problem with "permission denied" message inside my Gitlab Pipeline. It says:
Running with gitlab-runner 11.9.0 (692ae235)
on MyApp runner with shell DsaBC-oQ
Using Shell executor...
Running on MyComputer.network.provider...
mkdir: /Users/myusername/builds/DsaBC-oQ/0/username/myproj.tmp: Permission denied
mkdir: /Users/myusername/builds/DsaBC-oQ/0/username/myproj.tmp: Permission denied
ERROR: Job failed: exit status 1
I am on a MacOS, trying to set up CI for my iOS-project.
From what I have read here and here, I did the following gitlab-runner registration:
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token "TOKENABCDEF" \
--description "MyApp runner with shell" \
--tag-list ios \
--executor "shell"
After that I did:
cd ~
gitlab-runner install
gitlab-runner start
Then I rebooted my Mac.
Then I committed a code-change to my GitLab Git which triggered a GitLab Pipeline to start running. So far so good.
But then the error happens:
And after a few seconds of Pipeline, the "permission denied" error shows up (as printed out at the very beginning of this post).
What do I have to do in order to make this "permission denied" error go away ?
Other steps/trials:
I tried as well to make the gitlab-runner register with a "docker" container, such as:
gitlab-runner register \
--non-interactive \
--url "https://gitlab.com/" \
--registration-token "TOKENABCEDF" \
--description "MyApp runner with docker and ruby-2.6” \
--tag-list ios \
--executor "docker" \
--docker-image ruby:2.6
But doing it in a docker, there were many forum entries saying that you can't do this for an iOS project. And that one should use "shell" for an iOS project.
Also, the docker approach lead to another error inside my GitLab Pipeline:
[!] You cannot run CocoaPods as root