google / crfs

CRFS: Container Registry Filesystem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stargzify: Stargzifying images using HTTP fails

ktock opened this issue · comments

Stargzifying images on the HTTP registries fail when the registry isn't "localhost"(or 127.0.0.1).

We can stargzify images on the localhost using HTTP.

$ ./stargzify -upgrade 127.0.0.1:5000/ubuntu:18.04
2019/10/11 20:11:45 No matching credentials were found, falling back on anonymous
2019/10/11 20:11:46 pushed blob: sha256:c2a664698f4653bb4ad606cfeb701ccf07441973588c7294b23aff5e7e57e431
2019/10/11 20:11:46 pushed blob: sha256:5dc26a6e1f6217fa8d2aca4fd0bc60f2b0b7fbf6aac3d1473e948003be0f41ae
2019/10/11 20:11:46 pushed blob: sha256:3650658a2723d53534249a8f7785dbfc3b6e845cbe3b812ac37f5f29f98f2b68
2019/10/11 20:12:04 pushed blob: sha256:7b085330c7bb6994f0e1e720772493240386abe14f02e9aebc1df7dbd7306aa7
2019/10/11 20:12:04 pushed blob: sha256:720c7c23e42df652d62a51e48c9d441e0603a0384290fbe07461e426578f1841
2019/10/11 20:12:05 127.0.0.1:5000/ubuntu:18.04: digest: sha256:28665f72af70a56b0dfccf914c56c0cd7f478761bd527eb75d7b473aacf37ca2 size: 912

But if the registry isn't on the localhost, we can't.

$ ./stargzify -upgrade private:5000/ubuntu:18.04
2019/10/11 20:11:37 No matching credentials were found, falling back on anonymous
2019/10/11 20:11:37 Get https://private:5000/v2/: http: server gave HTTP response to HTTPS client

Fixed in aea3638. Thank you very much for merging.