Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image push fails when tags contains 2 or more items #126

Closed
zetaab opened this issue Sep 16, 2020 · 8 comments · Fixed by docker/setup-buildx-action#27
Closed

Image push fails when tags contains 2 or more items #126

zetaab opened this issue Sep 16, 2020 · 8 comments · Fixed by docker/setup-buildx-action#27

Comments

@zetaab
Copy link

zetaab commented Sep 16, 2020

Behaviour

Steps to reproduce this issue

use following workflow https://github.com/ElisaOyj/kops-autoscaler-openstack/blob/master/.github/workflows/master.yml

  1. it should have login to docker registry
  2. it should have push to registry with more than 2 tags

Expected behaviour

I expect that credentials are used to all tags that are listed.

Actual behaviour

https://github.com/ElisaOyj/kops-autoscaler-openstack/runs/1122690450?check_suite_focus=true I have executed this now twice but always only the first tag will use credentials and other tags will return http code 401 from registry.

We can see only one tag now in registry latest but another one is missing

@crazy-max
Copy link
Member

crazy-max commented Sep 16, 2020

@zetaab Encountered the same issue with GitHub Container Registry but not with DockerHub:

#92 exporting to image
#92 exporting layers
#92 exporting layers 4.1s done
#92 exporting manifest sha256:ef6889dcdcfebe634668dec3bfd438961ccca2547e45e155fbd122584418b951 0.0s done
#92 exporting config sha256:f07ac3e9d4c0e93f32473f36dc415d0feb4322b52ef7b7d25e31647d66516498 done
#92 exporting manifest sha256:b8d4d85dfd2e1a4ce254c324315e8f2c4bb92794f0f16d74e55e9f65e41d03f2 done
#92 exporting config sha256:73435118f72c21eeb48d58d2e733468feba6be36789e544cea01256581cf69b2
#92 exporting config sha256:73435118f72c21eeb48d58d2e733468feba6be36789e544cea01256581cf69b2 done
#92 exporting manifest sha256:718979d6ff040b74f7fd56e92baeb4878bc0c0103423d652c5a817dd13f5f463 done
#92 exporting config sha256:f5465fad284a2a1849958c9abf792d02eceeaeaa30be600f742df0d8482eb920 done
#92 exporting manifest sha256:23fc1a7c23f3b728b25a1f3d1a9e354d9e3e9ed7d0f1bced957c306731c862a4 done
#92 exporting config sha256:61e8aa7c5b3b146d2336c9369d49fbde6daea256a6a36293da22537085fa2386 done
#92 exporting manifest sha256:0fd53213d45b9d57a7dc370b7de3f7ecc46c3bf64cbe45b6bea02cb782fab8ae done
#92 exporting config sha256:f4f66070ab7dc523451ba81da86111830df289d02e93f06b4cb846decbbdb18d done
#92 exporting manifest sha256:b168ee11952b9fd0144f4ddd2d0e8678a92daf839d734134ee5fbe706e25f915 done
#92 exporting config sha256:6e272b05dccf55753a581b0509e80d68c81598419a163e349d10d794173f0d80 done
#92 exporting manifest list sha256:d99df961bd7dfb5fc3aab773b132632edabad08ecd5f8b1526e9b9a2a6d6f39a done
#92 pushing layers
#92 pushing layers 1.9s done
#92 pushing manifest for docker.io/crazymax/artifactory-cleanup:0.1.0
#92 pushing manifest for docker.io/crazymax/artifactory-cleanup:0.1.0 2.0s done
#92 pushing layers 1.4s done
#92 pushing manifest for ghcr.io/crazy-max/artifactory-cleanup:0.1.0
#92 pushing manifest for ghcr.io/crazy-max/artifactory-cleanup:0.1.0 4.9s done
#92 pushing layers 1.5s done
#92 pushing manifest for docker.io/crazymax/artifactory-cleanup:latest
#92 pushing manifest for docker.io/crazymax/artifactory-cleanup:latest 1.7s done
#92 pushing layers 0.2s done
#92 pushing manifest for ghcr.io/crazy-max/artifactory-cleanup:latest 0.1s done
#92 ERROR: failed commit on ref "manifest-sha256:b8d4d85dfd2e1a4ce254c324315e8f2c4bb92794f0f16d74e55e9f65e41d03f2": unexpected status: 401 Unauthorized

@tonistiigi told me it could be an issue with auth like docker/buildx#392. Can you try with:

      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
        with:
          driver-opts: image=moby/buildkit:master

@chriskinsman
Copy link

driver-opts didn't work here. Still when pushing multiple tags:

https://github.com/chriskinsman/tilloo/runs/1147251118?check_suite_focus=true

@crazy-max
Copy link
Member

crazy-max commented Sep 22, 2020

@chriskinsman
Copy link

@crazy-max Tried to make my build workflow as similar as possible to yours. Couldn't get it working until I removed the cache action. Now without caching it works. Once I changed the cache key/restore-keys to a new key so I no longer used any old cached output it worked.

@crazy-max
Copy link
Member

crazy-max commented Sep 22, 2020

@chriskinsman

Couldn't get it working until I removed the cache action. Now without caching it works.

Hum that's strange, the cache is not propagated if a step fails (Post Cache Docker layers here):

image

I will dig this out. Thanks for your feedback.

@zetaab
Copy link
Author

zetaab commented Sep 25, 2020

still not working for me

@djlauk
Copy link

djlauk commented Sep 25, 2020

I am having what looks like the same issue. I'm using GitHub Container Registry (ghcr.io), and one of the tags gets pushed, the other doesn't.

@djlauk
Copy link

djlauk commented Oct 13, 2020

Sorry for the delayed response. I can confirm it works now for me.
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants