Pipeline fails when triggered by admin
Summary
Admins cannot run pipelines in private repositories when they aren't explicit member of the project??
Steps to reproduce
- Create Private Repository as non-admin. Don't add root to this repo
- Log in as root
- Trigger Pipeline for this repo
What is the current bug behavior?
Pipeline cannot access the Repository, error 403
What is the expected correct behavior?
Runner should be able to access repository when running as admin
Relevant logs and/or screenshots
Running as root: (failure)
Running with gitlab-runner 11.0.2 (1db57d4a)
on ***.de 576dfb01
Using Docker executor with image gradle:alpine ...
Pulling docker image gradle:alpine ...
Using docker image sha256:68db735b4a4d7bc10747576074685ae496fe7f0f301e1b8a4ca578578b3fd335 for gradle:alpine ...
Running on runner-576dfb01-project-2-concurrent-0 via ***.de...
Fetching changes...
Removing .gradle/
Removing build/
HEAD is now at 1181f26 Merge branch 'score-fix'
remote: You are not allowed to download code from this project.
fatal: unable to access 'https://gitlab-ci-token:xxxxxxxxxxxxxxxxxxxx@***.de/Informatikprojekt/MarsMe.git/': The requested URL returned error: 403
ERROR: Job failed: exit code 1
Running as repo-member: (success)
Running with gitlab-runner 11.0.2 (1db57d4a)
on ***.de 75c4f75b
Using Docker executor with image gradle:alpine ...
Pulling docker image gradle:alpine ...
Using docker image sha256:68db735b4a4d7bc10747576074685ae496fe7f0f301e1b8a4ca578578b3fd335 for gradle:alpine ...
Running on runner-75c4f75b-project-2-concurrent-0 via ***.de...
Fetching changes...
Removing .gradle/
Removing build/
HEAD is now at 1181f26 Merge branch 'score-fix'
Checking out 1181f262 as master...
Skipping Git submodules setup
Checking cache for default...
Successfully extracted cache
$ export GRADLE_USER_HOME=`pwd`/.gradle
$ gradle classes
> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
BUILD SUCCESSFUL in 11s
2 actionable tasks: 2 up-to-date
Creating cache default...
build: found 99 matching files
.gradle: found 311 matching files
Created cache
Job succeeded
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)