Docker Community Forums

Share and learn in the Docker community.

Request access denied while pushing to private repo either locally on linux os or through gitlab ci

Behaviour

When trying to set up ci/cd in gitlab.

Steps to reproduce this issue

This id .gitlab-ci.yml file config
variables:
DOCKER_DRIVER: overlay
DOCKER_HOST: tcp://docker:2375/
DOCKER_TLS_CERTDIR: “”
docker-build-master:

Official docker image.

image: docker:18-git
stage: build
services:

  • docker:18-dind
    before_script:
  • docker info
  • docker login -u “$CI_REGISTRY_USER” -p “$CI_REGISTRY_TOKEN” $CI_REGISTRY
    script:
  • echo “Deploying Frontend…”
  • IMAGE_NAME="$CI_REGISTRY_REPO/$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
  • docker build --pull -t “$IMAGE_NAME” -f angular/Dockerfile .
  • docker push “$IMAGE_NAME”
  • echo "Frontend Deployment Complete! "
    only:
  • master

Expected behaviour

This should push to the docker hub private repo.

Tell us what happens instead
request access denied showing on gitlab terminal