GoogleContainerTools/skaffold · error

failed to download manifest from %s, err : %w

Error message

failed to download manifest from %s, err : %w

What it means

After URL validation, downloadFromURL performs http.Get(manifest). Any transport-level failure (DNS failure, connection refused/reset, TLS error, timeout) is wrapped as 'failed to download manifest from %s, err : %w'.

Source

Thrown at pkg/skaffold/kubernetes/manifest/url.go:57

	for _, manifest := range manifests {
		out, err := downloadFromURL(dir, manifest)

		if err != nil {
			return nil, err
		}
		paths = append(paths, out)
	}
	return paths, nil
}

func downloadFromURL(destDir string, manifest string) (string, error) {
	if manifest == "" || !util.IsURL(manifest) {
		return "", fmt.Errorf("%s is not a valid URL", manifest)
	}

	resp, err := http.Get(manifest)
	if err != nil {
		return "", fmt.Errorf("failed to download manifest from %s, err : %w", manifest, err)
	}
	defer resp.Body.Close()

	f, err := os.CreateTemp(destDir, "*.yaml")
	if err != nil {
		return "", fmt.Errorf("failed to create manifest file: %w", err)
	}
	defer f.Close()
	_, err = io.Copy(f, resp.Body)
	if err != nil {
		return "", fmt.Errorf("failed to write manifest to file, err: %w", err)
	}

	return f.Name(), nil
}

View on GitHub (pinned to a1189de023)

Solutions

  1. Verify network reachability: curl the exact URL from the same machine/container
  2. Configure proxy env vars (HTTP_PROXY/HTTPS_PROXY) or add the CA cert to the trust store for TLS errors
  3. Fix DNS/hosts entries or reconnect VPN, then re-run
Defensive patterns

Strategy: retry

Validate before calling

u, err := url.Parse(manifest)
if err == nil {
    addr := u.Hostname()
    if _, err := net.LookupHost(addr); err != nil {
        return fmt.Errorf("host %q not resolvable", addr)
    }
}

Try / catch

if err != nil {
    var netErr net.Error
    if errors.As(err, &netErr) && netErr.Timeout() {
        // backoff and retry download
    }
    return fmt.Errorf("download failed: %w", err)
}

Prevention

When it happens

Trigger: http.Get returning a non-nil error when downloading a remote manifest: unreachable host, no network, invalid TLS certificates, proxy issues, or a URL scheme http.Get cannot handle.

Common situations: Corporate proxy/firewall blocking the host; offline CI; self-signed certificates; DNS misconfiguration; VPN not connected.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/0594104db0f5d861. Report an issue: GitHub.