{"record":{"id":"31be343404c441e8","repo":"GoogleContainerTools/skaffold","slug":"cannot-fetch-remote-index-for-multiple-platform-im","errorCode":null,"errorMessage":"cannot fetch remote index for multiple platform image %q: %w","messagePattern":"cannot fetch remote index for multiple platform image %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/docker/remote.go","lineNumber":77,"sourceCode":"\tvar pl v1.Platform\n\tif len(platforms) == 1 {\n\t\tpl = util.ConvertToV1Platform(platforms[0])\n\t}\n\timg, err := getRemoteImage(src, cfg, pl)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"getting image: %w\", err)\n\t}\n\n\treturn remote.Write(targetRef, img, remote.WithAuthFromKeychain(primaryKeychain))\n}\n\nfunc getRemoteDigest(identifier string, cfg Config, platforms []specs.Platform) (string, error) {\n\tidx, err := getRemoteIndex(identifier, cfg)\n\tif err == nil {\n\t\treturn digest(idx)\n\t}\n\tif len(platforms) > 1 {\n\t\treturn \"\", fmt.Errorf(\"cannot fetch remote index for multiple platform image %q: %w\", identifier, err)\n\t}\n\tvar pl v1.Platform\n\tif len(platforms) == 1 {\n\t\tpl = util.ConvertToV1Platform(platforms[0])\n\t}\n\timg, err := getRemoteImage(identifier, cfg, pl)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"getting image: %w\", err)\n\t}\n\n\treturn digest(img)\n}\n\n// RetrieveRemoteConfig retrieves the remote config file for an image\nfunc RetrieveRemoteConfig(identifier string, cfg Config, platform v1.Platform) (*v1.ConfigFile, error) {\n\timg, err := getRemoteImage(identifier, cfg, platform)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/docker/remote.go#L59-L95","documentation":"getRemoteDigest first tries to read the image as a multi-platform index; when that fails and more than one platform was requested, it cannot fall back to a single-platform image, so it returns \"cannot fetch remote index for multiple platform image %q\" wrapping the registry error. Without an index, there is no single digest to represent all requested platforms.","triggerScenarios":"Push called with platforms of length >1 whose pushed image is a plain single-arch manifest (no manifest list), so getRemoteIndex fails on the registry GET of the manifest list.","commonSituations":"Building/pushing a multi-platform request where the build only produced one image; registry or proxy strips manifest lists; older registries that do not support OCI image indexes.","solutions":["Ensure the pushed image is actually a manifest list (build with multi-arch support, e.g. `docker buildx` with --platform).","Inspect with `crane manifest <image>` — if mediaType is not an index, the push produced a single-arch image.","Check the registry supports manifest lists/OCI indexes (older Quay/proxy caches may not).","If only one platform is really needed, pass a single platform so the code falls back to getRemoteImage.","Check the wrapped error — often auth or connectivity caused the index fetch to fail rather than a missing index."],"exampleFix":"// before\nskaffold.Push(tar, tag, cfg, []specs.Platform{{Architecture:\"amd64\"},{Architecture:\"arm64\"}}) // image is single-arch\n// after — verify it is an index\nm, _ := crane.Manifest(tag)\nif !strings.Contains(m, \"manifest list\") && !strings.Contains(m, \"index\") { platforms = nil } // fall back to single-platform lookup\nskaffold.Push(tar, tag, cfg, platforms)","handlingStrategy":"type-guard","validationCode":"func isManifestList(ref string) (bool, error) {\n\tm, err := crane.Manifest(ref)\n\tif err != nil { return false, err }\n\tmt := struct{ MediaType string `json:\"mediaType\"` }{}\n\tif err := json.Unmarshal([]byte(m), &mt); err != nil { return false, err }\n\treturn strings.Contains(mt.MediaType, \"index\") || strings.Contains(mt.MediaType, \"manifest.list\"), nil\n}","typeGuard":"func supportsMultiPlatform(platforms []specs.Platform, ref string) bool {\n\tif len(platforms) <= 1 { return true }\n\tisIdx, err := isManifestList(ref)\n\treturn err == nil && isIdx\n}","tryCatchPattern":"digest, err := docker.Push(tarPath, tag, cfg, platforms)\nif err != nil && strings.Contains(err.Error(), \"cannot fetch remote index for multiple platform image\") {\n\tlog.Warn(\"pushed image is not a manifest list; retrying single-platform digest lookup\")\n\tdigest, err = docker.Push(tarPath, tag, cfg, platforms[:1])\n}","preventionTips":["Build true multi-arch images (buildx --platform with a manifest list output) when requesting >1 platform.","Verify mediaType is an OCI/docker index after multi-arch pushes.","Avoid registries/proxies that flatten manifest lists.","Only pass multiple platforms when the build actually produced them."],"tags":["docker","registry","multi-arch","manifest-list"],"backgroundTag":"manifest-index-not-found","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}