{"record":{"id":"ece6fb9c0c774df8","repo":"slimtoolkit/slim","slug":"image-reference-metadata-get-error-s-v","errorCode":null,"errorMessage":"image reference metadata get error - %s (%v)","messagePattern":"image reference metadata get error - (.+?) \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/master/command/registry/handler_image_index.go","lineNumber":123,"sourceCode":"\t\t\tlogger.Debug(\"no image index in registry (ok)\")\n\t\t} else {\n\t\t\tlogger.Debugf(\"error checking image index in registry - %v\", err)\n\t\t}\n\t} else {\n\t\tlogger.Debug(\"image index is already in the registry\")\n\t}\n\n\timageIndex := v1.ImageIndex(empty.Index)\n\tindexImageImgRefs := make([]mutate.IndexAddendum, 0, len(cparams.ImageNames))\n\tfor _, imageName := range cparams.ImageNames {\n\t\timgRef, err := name.ParseReference(imageName, nameOpts...)\n\t\tif err != nil {\n\t\t\txc.FailOn(fmt.Errorf(\"malformed image reference - %s (%v)\", imageName, err))\n\t\t}\n\n\t\tmeta, err := remote.Get(imgRef, remoteOpts...)\n\t\tif err != nil {\n\t\t\txc.FailOn(fmt.Errorf(\"image reference metadata get error - %s (%v)\", imageName, err))\n\t\t}\n\n\t\tif meta.MediaType.IsImage() {\n\t\t\timgMeta, err := meta.Image()\n\t\t\txc.FailOn(err)\n\n\t\t\tbasicImageInfo(xc, imgMeta)\n\n\t\t\timgConfig, err := imgMeta.ConfigFile()\n\t\t\tif err != nil {\n\t\t\t\txc.FailOn(err)\n\t\t\t}\n\t\t\timgRefMeta, err := partial.Descriptor(imgMeta)\n\t\t\tif err != nil {\n\t\t\t\txc.FailOn(err)\n\t\t\t}\n\t\t\timgRefMeta.Platform = imgConfig.Platform()\n\t\t\tindexImageImgRefs = append(indexImageImgRefs,","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/master/command/registry/handler_image_index.go#L105-L141","documentation":"remote.Get(imgRef) failed to fetch metadata for a constituent image. Parse succeeded but the registry call failed — the image doesn't exist, the registry is unreachable, or auth failed. The original error is wrapped with the offending image name.","triggerScenarios":"remote.Get returns an error for any entry in ImageNames: image tag not pushed yet, wrong registry host, expired/missing token (transport.Error 401/403), DNS failure, or TLS problems.","commonSituations":"Referencing arch-specific tags that were never pushed; typo in the tag; pushing to a private registry with bad creds; corporate proxy blocking the registry; offline environment.","solutions":["Verify the image exists: 'docker manifest inspect <ref>' or curl the /v2/<repo>/manifests/<tag> endpoint","Push the constituent images before creating the index","Fix credentials (account/secret or UseDockerCreds) for private registries","Check network/DNS/TLS connectivity to the registry host"],"exampleFix":"// before\nremote.Get(imgRef) // fails: app:v1-arm64 never pushed\n// after\ndocker push registry.example.com/app:v1-arm64 # then retry index create","handlingStrategy":"validation","validationCode":"for _, n := range ImageNames {\n    ref, _ := name.ParseReference(n)\n    if _, err := remote.Head(ref, remoteOpts...); err != nil {\n        return fmt.Errorf(\"image %s not reachable: %w\", n, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if _, err := remote.Get(imgRef, remoteOpts...); err != nil {\n    var terr *transport.Error\n    if errors.As(err, &terr) && terr.StatusCode == 404 {\n        // image missing: push it first\n    } else if errors.As(err, &terr) && (terr.StatusCode == 401 || terr.StatusCode == 403) {\n        // fix credentials\n    }\n    return err\n}","preventionTips":["Push all constituent images before creating the index","Verify reachability with docker manifest inspect first","Keep credentials configured for private registries","Check registry DNS/TLS connectivity from the run environment"],"tags":["network","registry","image-reference"],"backgroundTag":"image-not-found-in-registry","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}