Access denied When push to registry

Why I can’t push to registry? I get a message

unauthorized: HTTP Basic: Access denied
ERROR: Job failed: exit status 1

I write in terminal

docker login

and after trying to push.
Runner installed as Shell.

    image: docker:latest
      - build_image
      stage: build_image
        - docker build -t $CI_REGISTRY_IMAGE .
        - docker push $CI_REGISTRY_IMAGE

Please check

docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY before docker push might work

1 Like