-
Notifications
You must be signed in to change notification settings - Fork 527
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
crane: Latest version of debug image broke crane cp #1662
Comments
Same here. A quick workaround is to use a previous image:
|
Can confirm the issue after a few hours of debugging. Using debug ( crane cp
crane push to same dest
So i suspect bad authorization is used |
So, for amd64:
Commit 1cb7e13 seems a good candidate |
You should soon be able to use |
Describe the bug
A gitlab CI/CD pipeline was incorrectly using
gcr.io/go-containerregistry/crane:debug
as the base image. Since it was always using the latest image, I caught a bug that is not present on thegcr.io/go-containerregistry/crane/debug:v0.14.0
version or even running v0.14.0 locally.The bug itself: all the pipeline did was run
crane cp [our gitlab] [our AWS ECR registry]
after authenticating to such registries usingcrane auth login
. However, after a certain commit (we don't know which), the latest image stopped working, splurting out the following error:Error: failed to copy image: HEAD https://[our ECR]/[our image]/blobs/sha256:fb3e216f5c10201b4e52856afc7739b07b2276d26087325315129efcc47cefdf: unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
After inspecting with --verbose, this error pretty much happens on every blob that tries to be pushed.
All other commands work fine on both registries, so this isn't an authentication issue.
To Reproduce
As explained earlier, all we did was authenticate to both registries with
crane auth login
and runcrane cp [our gitlab] [our AWS ECR registry]
on the latest debug version. I suspect this might happen on regular versions as well, but I haven't tested that.Expected behavior
Crane correctly copies the images from one registry to another.
Additional context
After updating the image to use
debug:v0.14.0
, the pipeline runs correctly.crane version
:217318c3b8e3aea04c135097619d83b22ed25fe2
gitlab
container registry andAWS ECR
The text was updated successfully, but these errors were encountered: