genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.88k stars 229 forks source link

cannot reuse body, request must be retried #363

Open MrNocTV opened 1 year ago

MrNocTV commented 1 year ago

I got this problem while trying to push an image to a private registry.

The push command

img push privateregistry.com/mlu-showroom-base-images/base-python3-torch:1.9.10

The error

Pushing privateregistry.com/mlu-showroom-base-images/base-python3-torch:1.9.10...
Error: failed to copy: failed to do request: Put "https://privateregistry..com/v2/mlu-showroom-base-images/base-python3-torch/blobs/uploads/de44409b-1aa3-4fc8-873a-a0f4ed44e910?_state=LA-
A28emekfDnbJiBp5cC0dLbtMSKBrrjs7EgtGbv0l7Ik5hbWUiOiJtbHUtc2hvd3Jvb20tYmFzZS1pbWFnZXMvYmFzZS1weXRob24zLXR
vcmNoIiwiVVVJRCI6ImRlNDQ0MDliLTFhYTMtNGZjOC04NzNhLWEwZjRlZDQ0ZTkxMCIsIk9mZnNldCI6MCwiU3RhcnRlZEF0IjoiMjAy
Mi0xMi0yM1QwNDo1MTo1MC40NzI5NjU1NTdaIn0%3D&digest=sha256%3A7d9dab35a20f89ef26ca8a756ced97dd5e419ea9c648215cccdbcc9f1c465991": 
cannot reuse body, request must be retried

After several tries, it pushed successfully.