diff --git a/cmd/skopeo/sync.go b/cmd/skopeo/sync.go index 6884d8b1..2336669c 100644 --- a/cmd/skopeo/sync.go +++ b/cmd/skopeo/sync.go @@ -216,15 +216,7 @@ func getImageTags(ctx context.Context, sysCtx *types.SystemContext, repoRef refe } tags, err := docker.GetRepositoryTags(ctx, sysCtx, dockerRef) if err != nil { - var unauthorizedForCredentials docker.ErrUnauthorizedForCredentials - if errors.As(err, &unauthorizedForCredentials) { - // Some registries may decide to block the "list all tags" endpoint. - // Gracefully allow the sync to continue in this case. - logrus.Warnf("Registry disallows tag list retrieval: %s", err) - tags = nil - } else { - return nil, fmt.Errorf("Error determining repository tags for image %s: %w", name, err) - } + return nil, fmt.Errorf("Error determining repository tags for image %s: %w", name, err) } return tags, nil diff --git a/integration/sync_test.go b/integration/sync_test.go index 25c369b5..16569baf 100644 --- a/integration/sync_test.go +++ b/integration/sync_test.go @@ -534,7 +534,7 @@ func (s *SyncSuite) TestFailsNoSourceImages(c *check.C) { assertSkopeoFails(c, ".*No images to sync found in .*", "sync", "--scoped", "--dest-tls-verify=false", "--src", "dir", "--dest", "docker", tmpDir, v2DockerRegistryURL) - assertSkopeoFails(c, ".*No images to sync found in .*", + assertSkopeoFails(c, ".*Error determining repository tags for repo docker.io/library/hopefully_no_images_will_ever_be_called_like_this: fetching tags list: requested access to the resource is denied.*", "sync", "--scoped", "--dest-tls-verify=false", "--src", "docker", "--dest", "docker", "hopefully_no_images_will_ever_be_called_like_this", v2DockerRegistryURL) } @@ -557,7 +557,7 @@ func (s *SyncSuite) TestFailsWithDockerSourceUnauthorized(c *check.C) { tmpDir := c.MkDir() //untagged - assertSkopeoFails(c, ".*Registry disallows tag list retrieval.*", + assertSkopeoFails(c, ".*requested access to the resource is denied.*", "sync", "--scoped", "--src", "docker", "--dest", "dir", repo, tmpDir) //tagged