I have an image gitlab.com/arxeiss/deployer
and project gitlab.com/arxeiss/my-project
with .gitlab-ci.yml
file:
deploy:
image: registry.gitlab.com/arxeiss/deployer
stage: build
When I push to origin, pipeline works and image is pulled successfully. But when someone else pushes, who doesn't have access to deployer this error is thrown: Error response from daemon: pull access denied for registry.gitlab.com/arxeiss/deployer, repository does not exist or may require 'docker login'
I have found in Documentation that I need DOCKER_AUTH_CONFIG
and the way how to set it up . But that means, I have to put auth token from docker login
and ~/.docker/config.json
into CI/CD Variables.
But that is assigned to my account. So someone can use it and if I reset password etc. it stops working. Is there different way how to make it work?
If you don't want to use your regular credentials, you can use a personal access token or deploy token instead - see here .
That way it'll still work if you change your password and, as a bonus, you can revoke it without changing your regular password.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.