Hi!
I have latest gitlab (16.6.2) on custom server and gitlab runner (16.6.1) on another custom server.
I have project A using image from project B via gitlab-ci.yml param “image”, both private repositories.
But when pipeline starts i get failed to pull image "registry.domain.ltd/path-to-image:main" with specified policies [always]: Error response from daemon: pull access denied for registry.domain.ltd/path-to-image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
.
I tried turning on setting “Limit acces to this project” in Token Access section in project B and whitelist project A, but error still there.
I don’t want to store login credentials to gitlab-ci.yml and as gitlab docs says it isn’t necessary.
What additional setup do i need?
Seems like you just need to login
docker login registry.gitlab.example.com -u $USER -p $PASS
With the creds stored in a protected and masked gitlab variable at the project level or at the group/user level.
The container registry is a different part of gitlab, the “limit access to project” is more project info / packaged artifacts (like all the files in a zip) / metrics.
I copy project B into same group as project A and now it works without docker login.