You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copying a private remote image with a name consisting of more than two slash delimited components -- e.g. ghcr.io/njhale/foo/bar:latest -- into a Docker Hub repository with a standard "2 part" name -- docker.io/njhale/bar:latest -- fails with: unexpected status code 400 Bad Request: {"details":"invalid repository name"}.
To Reproduce
Build, tag, and push a private image with a "3 part" name into a registry that supports it, such as GHCR
Use crane copy, setting the destination to a repo in docker.io
$ crane copy ghcr.io/njhale/foo/bar:latest docker.io/njhale/bar:latest
2023/05/04 14:14:37 Copying from ghcr.io/njhale/foo/bar:latest to docker.io/njhale/bar:latest
Error: failed to copy index: Post "https://index.docker.io/v2/njhale/bar/blobs/uploads/?from=njhale%2Ffoo%2Fbar&mount=sha256%3A493e4c0237bba932cb727098a2e21827b39e361ea2795b1b4598752d769a1d7b&origin=ghcr.io": GET https://auth.docker.io/token?scope=repository%3Anjhale%2Fbar%3Apull%2Cpush+repository%3Anjhale%2Ffoo%2Fbar%3Apull&scope=repository%3Anjhale%2Fbar%3Apush%2Cpull&service=registry.docker.io: unexpected status code 400 Bad Request: {"details":"invalid repository name"}
Expected behavior
The image is successfully copied into the target Docker Hub repo.
Describe the bug
Copying a private remote image with a name consisting of more than two slash delimited components -- e.g.
ghcr.io/njhale/foo/bar:latest
-- into a Docker Hub repository with a standard "2 part" name --docker.io/njhale/bar:latest
-- fails with:unexpected status code 400 Bad Request: {"details":"invalid repository name"}
.To Reproduce
crane copy
, setting the destination to a repo indocker.io
Expected behavior
The image is successfully copied into the target Docker Hub repo.
Additional context
remote.WriteIndex
using module versionv0.13.0
crane
version0.14.0
The text was updated successfully, but these errors were encountered: