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

Dung Do Tien May 22 2022 677

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 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
$ docker login -u bookstore223 -p 1234578@
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get unauthorized: HTTP Basic: Access denied
Cleaning up project directory and file based variables
ERROR: Job failed: exit status 1 

Below is my gitlab-ci.yml file

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

    stage: build
        - build_product
        - docker login -u bookstore223 -p 1234578@
        - bash
        - docker login
        - docker build -t . -f BMM.App/Dockerfile
        - docker push
        - 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 1234578@  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