docker-image-pusher icon indicating copy to clipboard operation
docker-image-pusher copied to clipboard

How to push to a private registry over http instead of https?

Open xlight opened this issue 8 months ago β€’ 2 comments

I want to use this tool to push a tar to private registry.

but this tool always try to push over https.

How to force it to use http instead of https ?

❯ ./docker-image-pusher-darwin-x86_64 push --tar busybox.tar  --registry http://172.20.6.128:5000/omni/busybox
πŸ“¦ Preparing to push Docker archive: busybox.tar
πŸ“ Tar archive RepoTag detected: docker.m.daocloud.io/busybox:latest
πŸ’‘ No recent history matched. Using target derived from tar metadata: http://172.20.6.128:5000/omni/busybox/busybox:latest
🎯 Target image resolved as: http://172.20.6.128:5000/omni/busybox/busybox:latest
🧭 Suggested alternate target '172.20.6.128:5000/busybox:latest' using stored login 172.20.6.128:5000
Detected missing login. Proposing alternate target based on stored credentials. Proceed with '172.20.6.128:5000/busybox:latest' ? [Y/n]:
πŸ” Switching to inferred target: 172.20.6.128:5000/busybox:latest
πŸ” Preparing registry session with 172.20.6.128:5000
πŸ“¦ Extracting tar archive to build digest table...
πŸ“¦ Extracting layer: d88cd7bdb4e9c3a339943dafa5d52113864f41530191d19cb8b618c2d114f624/layer.tar (4.1 MB)
   βœ… Layer extracted: sha256:f21ad18174949794e810922c8ada6ff8416aabab8ef3fd3bd144e47058359f52 in 0.0s @ 0.0 MB/s
βœ… Successfully extracted 1 layers and config

πŸ“¦ [1/1] Uploading layer sha256:f21ad18174949794e810922c8ada6ff8416aabab8ef3fd3bd144e47058359f52 (4.1 MB)
   ⚠️  Unable to check blob sha256:f21ad18174949794e810922c8ada6ff8416aabab8ef3fd3bd144e47058359f52 presence in registry (continuing with upload): Network error: error sending request for url (https://172.20.6.128:5000/v2/busybox/blobs/sha256:f21ad18174949794e810922c8ada6ff8416aabab8ef3fd3bd144e47058359f52)
   πŸ“€ Uploading layer directly: sha256:f21ad18174949794e810922c8ada6ff8416aabab8ef3fd3bd144e47058359f52 (4.1 MB)

Error: PushError("Failed to upload layers: Network error: error sending request for url (https://172.20.6.128:5000/v2/busybox/blobs/uploads/)")

xlight avatar Mar 11 '26 08:03 xlight

Hi there! Thanks for reporting this. I’ve opened PR #4 to fix this by ensuring the tool respects http:// registry URLs instead of defaulting to https://. This should resolve the network errors you’re encountering when pushing to your private registry over plain HTTP. Feel free to review the changes and let me know if it works for you! πŸš€

webbrain-one avatar Aug 15 '26 09:08 webbrain-one

thank you for your work ! But I do not have a environment for http registry now.

xlight avatar Aug 19 '26 05:08 xlight