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

http error while copying a .oci archive to local registry #2371

Closed
pacostas opened this issue Jun 28, 2024 · 3 comments
Closed

http error while copying a .oci archive to local registry #2371

pacostas opened this issue Jun 28, 2024 · 3 comments

Comments

@pacostas
Copy link

Brief description

While copying with skopeo version 1.15.1 and docker version 26.0.0 a .oci archive to local registry, it fails with below message:

FATA[0000] trying to reuse blob sha256:98be1b9a299ccd651050fba79b85d091348447816285d33bc7c09d5679f69300 at destination: pinging container registry localhost:5000: Get "https://localhost:5000/v2/": http: server gave HTTP response to HTTPS client 

Related issue

Steps to reproduce

  1. docker run -d -p 5000:5000 --restart=always --name registry registry:2
  2. download the build.oci image from here https://github.com/paketo-community/ubi-base-stack/releases/tag/v0.0.65 (any oci image will do)
  3. copy the image to local registry with skopeo skopeo copy --debug oci-archive:path/to/build.oci docker://localhost:5000/build-image-test:latest --dest-tls-verify=false

It outputs the below error:

DEBU[0000] Using registries.d directory /etc/containers/registries.d 
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf" 
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf.d/000-shortnames.conf" 
DEBU[0000] No credentials matching localhost:5000/build-image-test found in /run/user/1000/containers/auth.json 
DEBU[0000] No credentials matching localhost:5000/build-image-test found in /home/costas/.config/containers/auth.json 
DEBU[0000] No credentials matching localhost:5000/build-image-test found in /home/costas/.docker/config.json 
DEBU[0000] No credentials matching localhost:5000/build-image-test found in /home/costas/.dockercfg 
DEBU[0000] No credentials for localhost:5000/build-image-test found 
DEBU[0000]  No signature storage configuration found for localhost:5000/build-image-test:latest, using built-in default file:///home/costas/.local/share/containers/sigstore 
DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/localhost:5000 
DEBU[0000] Using SQLite blob info cache at /home/costas/.local/share/containers/cache/blob-info-cache-v1.sqlite 
DEBU[0000] IsRunningImageAllowed for image oci-archive:/home/costas/Desktop/ubi-base-stack/build/build.oci 
DEBU[0000]  Using default policy section                
DEBU[0000]  Requirement 0: allowed                      
DEBU[0000] Overall: allowed                             
Getting image source signatures
DEBU[0000] Manifest has MIME type application/vnd.docker.distribution.manifest.v2+json, ordered candidate list [application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.v1+prettyjws, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.docker.distribution.manifest.v1+json] 
DEBU[0000] ... will first try using the original manifest unmodified 
DEBU[0000] Checking if we can reuse blob sha256:98be1b9a299ccd651050fba79b85d091348447816285d33bc7c09d5679f69300: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true 
DEBU[0000] Checking /v2/build-image-test/blobs/sha256:98be1b9a299ccd651050fba79b85d091348447816285d33bc7c09d5679f69300 
DEBU[0000] GET https://localhost:5000/v2/               
DEBU[0000] Ping https://localhost:5000/v2/ err Get "https://localhost:5000/v2/": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://localhost:5000/v2/", Err:(*errors.errorString)(0x55b7bf163820)}) 
DEBU[0000] GET https://localhost:5000/v1/_ping          
DEBU[0000] Ping https://localhost:5000/v1/_ping err Get "https://localhost:5000/v1/_ping": http: server gave HTTP response to HTTPS client (&url.Error{Op:"Get", URL:"https://localhost:5000/v1/_ping", Err:(*errors.errorString)(0x55b7bf163820)}) 
DEBU[0000] Checking if we can reuse blob sha256:5208a9ec700e8980bfc1c6341ffdfc9f5fca83c9cfc4face8effbb23907404d2: general substitution = true, compression for MIME type "application/vnd.docker.image.rootfs.diff.tar.gzip" = true 
DEBU[0000] Checking /v2/build-image-test/blobs/sha256:5208a9ec700e8980bfc1c6341ffdfc9f5fca83c9cfc4face8effbb23907404d2 
DEBU[0000] error deleting tmp dir: <nil>                
FATA[0000] trying to reuse blob sha256:98be1b9a299ccd651050fba79b85d091348447816285d33bc7c09d5679f69300 at destination: pinging container registry localhost:5000: Get "https://localhost:5000/v2/": http: server gave HTTP response to HTTPS client 

@mtrmac
Copy link
Contributor

mtrmac commented Jun 28, 2024

Thanks for your report.

The log really looks like the --dest-tls-verify=false option was missing. Yes, I realize that’s in conflict with the steps to reproduce.

Copy link

A friendly reminder that this issue had no activity for 30 days.

@mtrmac
Copy link
Contributor

mtrmac commented Jul 29, 2024

Assuming a missing --dest-tls-verify=false was the cause; please reopen if you can reproduce this and confirm that’s not the case.

@mtrmac mtrmac closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants