admin管理员组

文章数量:1134247

The error message you're encountering during my Docker build process indicates an authentication issue with my private registry (it's Harnor):

failed to authorize: failed to fetch oauth token: unexpected status from GET request to : 400 Bad Request

my gitlab ci scripts

stage: build
  image: registry.internal.amdrnn.ir/library/docker:27.4.1
  services:
    - name: xxx.xxx/library/docker:27.4.1-dind
      alias: docker
      command: ["--tls=false"] # Ensure TLS is disabled
  script:
    - echo "Logging into Docker Registry"
    - echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
    - echo "Login successful"
    - echo "Waiting for Docker daemon..."
    - until docker info; do sleep 3; done
    - echo "Building Docker image for development"
    - docker build -f ./Dockerfile -t $IMAGE_REGISTRY:$CI_COMMIT_REF_SLUG .
    - docker push $IMAGE_REGISTRY:$CI_COMMIT_REF_SLUG

this my ci/cd script by gilab.

it's login successfully but when it wants to build the docker image it throws that error while it's logged in

本文标签: