Error response from daemon unauthorized: HTTP Basic: Access denied CICD GitLab

Dung Do Tien May 22 2022 265

Hello, I have a project using .Net 6 and deploying to a Linux server. I using Gitlab CI/CD to help deploy faster. After I committed code it will auto-deploy for me. But I got an error: Error response from daemon: Get https://registry.gitlab.com/v2/: unauthorized: HTTP Basic: Access denied.

Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /opt/gitlab-runner/builds/UqLsFMxZ/0/dodung1221/bookstore_v2/.git/
Checking out 1d52d14c as testing...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:00
$ docker login -u bookstore223 -p [email protected] registry.gitlab.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://registry.gitlab.com/v2/: unauthorized: HTTP Basic: Access denied
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1

Below is my gitlab-ci.yml file

image: docker:stable
services:
    - docker:dind
    
stages:
  - build
  - deploy

bookmanager(build):
    stage: build
    tags:
        - build_product
    before_script:
        - docker login -u bookstore223 -p [email protected] registry.gitlab.com
        - bash move-csproj.sh
    script:
        - docker login registry.gitlab.com
        - docker build -t registry.gitlab.com/bookstore223/bookstore223:latest . -f BMM.App/Dockerfile
        - docker push registry.gitlab.com/bookstore223/bookstore223:latest
    only:
        - testing

I added more docker login but the issue is still not solved for me.

Anyone can help me on this.

Thanks in advance.

Have 1 answer(s) found.
  • k

    khushi kumari May 22 2022

    I got the same issue when I worked in old my company. Someone reset my password or deactivate my account so I got this issue.

    Please check again, is the password [email protected]  correct? (in gitlab-ci.yml file)

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close