GoogleContainerTools/skaffold · error
cannot fetch remote index for multiple platform image %q: %w
Error message
cannot fetch remote index for multiple platform image %q: %w
What it means
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.
Source
Thrown at pkg/skaffold/docker/remote.go:77
var pl v1.Platform
if len(platforms) == 1 {
pl = util.ConvertToV1Platform(platforms[0])
}
img, err := getRemoteImage(src, cfg, pl)
if err != nil {
return fmt.Errorf("getting image: %w", err)
}
return remote.Write(targetRef, img, remote.WithAuthFromKeychain(primaryKeychain))
}
func getRemoteDigest(identifier string, cfg Config, platforms []specs.Platform) (string, error) {
idx, err := getRemoteIndex(identifier, cfg)
if err == nil {
return digest(idx)
}
if len(platforms) > 1 {
return "", fmt.Errorf("cannot fetch remote index for multiple platform image %q: %w", identifier, err)
}
var pl v1.Platform
if len(platforms) == 1 {
pl = util.ConvertToV1Platform(platforms[0])
}
img, err := getRemoteImage(identifier, cfg, pl)
if err != nil {
return "", fmt.Errorf("getting image: %w", err)
}
return digest(img)
}
// RetrieveRemoteConfig retrieves the remote config file for an image
func RetrieveRemoteConfig(identifier string, cfg Config, platform v1.Platform) (*v1.ConfigFile, error) {
img, err := getRemoteImage(identifier, cfg, platform)
if err != nil {
return nil, errView on GitHub (pinned to a1189de023)
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.
Example fix
// before
skaffold.Push(tar, tag, cfg, []specs.Platform{{Architecture:"amd64"},{Architecture:"arm64"}}) // image is single-arch
// after — verify it is an index
m, _ := crane.Manifest(tag)
if !strings.Contains(m, "manifest list") && !strings.Contains(m, "index") { platforms = nil } // fall back to single-platform lookup
skaffold.Push(tar, tag, cfg, platforms) Defensive patterns
Strategy: type-guard
Validate before calling
func isManifestList(ref string) (bool, error) {
m, err := crane.Manifest(ref)
if err != nil { return false, err }
mt := struct{ MediaType string `json:"mediaType"` }{}
if err := json.Unmarshal([]byte(m), &mt); err != nil { return false, err }
return strings.Contains(mt.MediaType, "index") || strings.Contains(mt.MediaType, "manifest.list"), nil
} Type guard
func supportsMultiPlatform(platforms []specs.Platform, ref string) bool {
if len(platforms) <= 1 { return true }
isIdx, err := isManifestList(ref)
return err == nil && isIdx
} Try / catch
digest, err := docker.Push(tarPath, tag, cfg, platforms)
if err != nil && strings.Contains(err.Error(), "cannot fetch remote index for multiple platform image") {
log.Warn("pushed image is not a manifest list; retrying single-platform digest lookup")
digest, err = docker.Push(tarPath, tag, cfg, platforms[:1])
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- getting auth config: %w
- getting auth config for %q: %w
- %s %q: %w
- pulling image from repository: %w
- retrieving image config: %w
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/31be343404c441e8.
Report an issue: GitHub.