title: Cannot pull or push to personal registry from gitlab CI
body: <p>I implemented my own docker registry and test it from localhost (push) and from my server (pull) successfully. Now, I am trying to build and push image from my CI pipeline:</p>
  <pre><code>build:
    image: docker:18
    services:
      - docker:dind
    stage: build
    script:
      - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
      - docker pull $CI_REGISTRY/website:latest
      - docker build -t $CI_REGISTRY/website:latest .
      - docker push $CI_REGISTRY/website:latest
  </code></pre>
  <p>I am able to log into registry:</p>
  <pre><code>$ echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
  WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
  Configure a credential helper to remove this warning. See
  https://docs.docker.com/engine/reference/commandline/login/#credentials-store
  Login Succeeded
  </code></pre>
  <p>And when I am trying to pull my <strong>website:latest</strong> image, I am receive error:</p>
  <pre><code>$ docker pull $CI_REGISTRY/website:latest
  Error response from daemon: pull access denied for registry.gitlab.com/website, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
  </code></pre>
  <p>I configured all variables properly in <strong>CI/CD</strong> -&gt; <strong>Variables</strong> but I can see here <strong>registry.gitlab.com</strong> as my registry.I tried to rename <strong>CI_REGISTRY</strong> to <strong>CI_REGISTRY_ADDRESS</strong>, because I thought, maybe gitlab is using it as system variable and I cannot replace it (even when I am using this settings, variables and login, the same way like in another project, and its working). So now, I am receiving this error:</p>
  <pre><code>$ echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY_ADDRESS
  Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
  </code></pre>
  <p>I tried to google the solution, but didnt fine anything helpful. I am not sure why this settings works for another project and not for this one. Maybe I am missing something, not sure what. Could anybody help me to figure out what cause the problem and how to configure personal registry</p>
  <p><strong>EDIT1:</strong>
  Just example that the same configuration works fine on my another project:</p>
  <pre><code>$ echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
  WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
  Configure a credential helper to remove this warning. See
  https://docs.docker.com/engine/reference/commandline/login/#credentials-store
  Login Succeeded
  </code></pre>
  <p>After this successful login, I am able to push and pull image.</p>