I have GitLab platform in 8.7.0 version and I am currently working on setting up CI part. I have created new gitlab-runner that uses shell as an executor. The problem is that before the runner is invoked to do own jobs the system is not able to fetch git changes. The console output from build process:
gitlab-ci-multi-runner 1.1.3 (a470667)
Using Shell executor...
Running on <my-page>...
Fetching changes...
warning: failed to remove <some-path>/localClassSetAnalysis.bin
warning: failed to remove <some-path>/localClassSetAnalysis.lock
...
gitlab-ci-multi-runner 1.1.3 (a470667)
Using Shell executor...
Running on <my-page>...
Cloning repository...
rm: cannot remove ‘path-to-some-directory>’: Permission denied
rm: cannot remove ‘path-to-some-directory>’: Permission denied
...
The folder where the files are stored is /home/gitlab-runner/builds So I suppose, there are two users: git and gitlab-runner and git user cannot remove or rewrite the files in this directory. After change the directory permissions build process is started and successfully finished but after that the files again have old permissions (read+write for the user (gitlab-runner) and read for the rest). So right now I must (the easiest way) delete all from /home/gitlab-runner/builds always before build, but of course it's not the solution... What should I do?
Shell executor This executor is running the jobs directly on the machine where the runner has been installed.
PowerShell Desktop Edition is the default shell when a new runner is registered on Windows using GitLab Runner 12.0-13.12. In 14.0 and later, the default is PowerShell Core Edition. PowerShell doesn't support executing the build in context of another user.
GitLab Runner can use Docker to run jobs on user provided images. This is possible with the use of Docker executor. The Docker executor when used with GitLab CI, connects to Docker Engine and runs each build in a separate and isolated container using the predefined image that is set up in .
I was having the same problem, and I think I figured it out. You'll need to verify what group your new files are being created under (mine was tape
), and then add gitlab-runner
to that group. In my case the command looked like this...
sudo usermod -a -G tape gitlab-runner
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With