GitLab registry 'denied: requested access to the resource is denied' to push image

0

I get the following error in% co_of% trying to push to image from% co_of% to the registry

$ docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"

Login Succeeded

$ docker pull <anyImage>


$ docker push "${CI_REGISTRY_IMAGE}/${HAPROY_IMAGE}:${CI_COMMIT_REF_NAME}"

The push refers to repository [gitlab-registry.domain/repo]
aaaaaaa: Preparing
bbbbbbb: Preparing
ccccccc: Preparing
ddddddd: Preparing
ddddddd: Waiting
eeeeeee: Waiting

denied: requested access to the resource is denied
**ERROR: Job failed: exit code 1**

My GitLab looks something like this:

Build Origin:
  stage: build
  tags:
  - docker-privileged

  image: gitlab-registry.domain

  before_script:
  - yum install -y docker-client rsync git
  - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"

  - docker pull <anyImage>
  - docker tag <dockerHub>/tag "${CI_REGISTRY_IMAGE}/${HAPROY_IMAGE}:${CI_COMMIT_REF_NAME}"

  - docker push "${CI_REGISTRY_IMAGE}/${HAPROY_IMAGE}:${CI_COMMIT_REF_NAME}"

Anyone any idea in order to fix it?

    
asked by Iago Santos 18.12.2018 в 15:12
source

0 answers