docker / setup-buildx-action

GitHub Action to set up Docker Buildx
https://github.com/marketplace/actions/docker-setup-buildx
Apache License 2.0
984 stars 156 forks source link

ERROR: Error response from daemon: Head "https://registry-1.docker.io/v2/moby/buildkit/manifests/buildx-stable-1": unauthorized: incorrect username or password #360

Closed herberthobregon closed 1 month ago

herberthobregon commented 1 month ago

Contributing guidelines

I've found a bug, and:

Description

When I use in ga:

jobs:
  build-deploy-package:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

I get:

ERROR: Error response from daemon: Head "https://registry-1.docker.io/v2/moby/buildkit/manifests/buildx-stable-1": unauthorized: incorrect username or password

Expected behaviour

Works fine

Actual behaviour

doesn' work

Repository URL

No response

Workflow run URL

No response

YAML workflow

jobs:
  build-deploy-package:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

Workflow logs

No response

BuildKit logs

Booting builder
  /usr/bin/docker buildx inspect --bootstrap --builder builder-8dfdcb27-2175-4714-b2cb-312a1c605e4b
  #1 [internal] booting buildkit
  #1 pulling image moby/buildkit:buildx-stable-1
  #1 pulling image moby/buildkit:buildx-stable-1 0.2s done
  #1 ERROR: Error response from daemon: Head "https://registry-1.docker.io/v2/moby/buildkit/manifests/buildx-stable-1": unauthorized: incorrect username or password
  ------
   > [internal] booting buildkit:
  ------
  ERROR: Error response from daemon: Head "https://registry-1.docker.io/v2/moby/buildkit/manifests/buildx-stable-1": unauthorized: incorrect username or password
Error: ERROR: Error response from daemon: Head "https://registry-1.docker.io/v2/moby/buildkit/manifests/buildx-stable-1": unauthorized: incorrect username or password

Additional info

No response

rsflaherty commented 1 month ago

https://www.dockerstatus.com/ is showing an issue with personal access tokens against docker hub registry currently. Not sure if that is related.

stdavis commented 1 month ago

This looks like a duplicate of #358 to me.

acheung-harmonicinc commented 1 month ago

I run docker logout before docker/setup-buildx-action@v3 then issue is gone. Not sure if it was a GH issue or setup-buildx-action or dockerhub issue though

thaJeztah commented 1 month ago

There was / is an issue with authentication through personal access tokens; see https://www.dockerstatus.com/

jacksontj commented 1 month ago

I run docker logout before docker/setup-buildx-action@v3 then issue is gone. Not sure if it was a GH issue or setup-buildx-action or dockerhub issue though

This workaround also works for me -- presumably just pushing to the un-authed (which isn't impacted by the current issue)

herberthobregon commented 1 month ago

Here are all the people who deploy on a Friday? Do it on Monday 😂

I was going crazy. It said but it worked a few hours ago and I didn't change anything

devdammit commented 1 month ago

I run docker logout before docker/setup-buildx-action@v3 then issue is gone. Not sure if it was a GH issue or setup-buildx-action or dockerhub issue though

This workaround also works for me! Thanks

data-if commented 1 month ago

unexpectedly

CumpsD commented 1 month ago

This works:

      - name: Fix Docker Hub Issue
        run: docker logout

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v3.6.1

      - name: Login to GitHub Container Registry
        uses: docker/login-action@v3.3.0
        with:
          registry: ${{ env.DOCKER_REGISTRY }}
          username: ${{ github.repository_owner }}
          password: ${{ secrets.GITHUB_TOKEN }}
tonistiigi commented 1 month ago

This was hub-side issue with personal access tokens. Should be resolved now.

https://www.dockerstatus.com/

September 27, 2024 14:20 PDT September 27, 2024 21:20 UTC[Monitoring] Access Tokens are working again, and error rates have returned to normal. Will continue to monitor.