GoogleContainerTools/skaffold · warning

getting latest and current skaffold versions: %w

Error message

getting latest and current skaffold versions: %w

What it means

checkVersion performs the update check by calling GetLatestAndCurrentVersion, which fetches the latest released skaffold version (network call) and compares it to the running binary. Any failure in that lookup — version file unreadable, HTTP request failed, response unparseable — is wrapped in this error and propagated to CheckVersion/CheckVersionOnError.

Source

Thrown at pkg/skaffold/update/update.go:60

// CheckVersion returns an update message when update check is enabled and skaffold binary in not latest
func CheckVersion(config string) (string, error) {
	return checkVersion(config, false)
}

// CheckVersionOnError returns an error message when update check is enabled and skaffold binary in not latest
func CheckVersionOnError(config string) (string, error) {
	return checkVersion(config, true)
}

func checkVersion(configfile string, onError bool) (string, error) {
	if !isUpdateCheckEnabled(configfile) {
		log.Entry(context.TODO()).Debug("Update check not enabled, skipping.")
		return "", nil
	}
	latest, current, err := GetLatestAndCurrentVersion()
	if err != nil {
		return "", fmt.Errorf("getting latest and current skaffold versions: %w", err)
	}
	if latest.GT(current) && config.ShouldDisplayUpdateMsg(configfile) {
		if onError {
			return fmt.Sprintf("Your Skaffold version might be too old. Download the latest version (%s) from:\n  %s\n", latest, releaseURL(latest)), nil
		}
		return fmt.Sprintf("There is a new version (%s) of Skaffold available. Download it from:\n  %s\n", latest, releaseURL(latest)), nil
	}
	return "", nil
}

// isUpdateCheckEnabled returns whether or not the update check is enabled
// It is true by default, but setting it to any other value than true will disable the check
func isUpdateCheckEnabled(configfile string) bool {
	return EnableCheck && isConfigUpdateCheckEnabled(configfile)
}

// getLatestAndCurrentVersion uses a VERSION file stored on GCS to determine the latest released version
// and returns it with the current version of Skaffold

View on GitHub (pinned to a1189de023)

Solutions

  1. Disable the update check (updateCheck: false in skaffold config or SKAFFOLD_UPDATE_CHECK=false env var) for offline/CI environments
  2. Fix network egress/proxy settings so the releases endpoint is reachable
  3. Retry later if the failure is transient rate limiting
  4. Verify the local skaffold binary/version metadata is intact

Example fix

// before
// CI with no egress, update check on by default → error on every run

// after
export SKAFFOLD_UPDATE_CHECK=false
skaffold dev
Defensive patterns

Strategy: fallback

Validate before calling

if os.Getenv("SKAFFOLD_UPDATE_CHECK") == "false" || offlineMode() {
    return // skip CheckVersion entirely
}
if _, err := net.DialTimeout("tcp", "api.github.com:443", 2*time.Second); err != nil {
    return // no egress, skip update check
}

Try / catch

if msg, err := update.CheckVersion(cfg, false); err != nil {
    log.Debugf("update check skipped: %v", err) // never fail the run for update checks
} else if msg != "" {
    log.Infof("%s", msg)
}

Prevention

When it happens

Trigger: Calling CheckVersion or CheckVersionOnError when GetLatestAndCurrentVersion fails: no network access to the releases endpoint, proxy blocking the request, GitHub API rate limit, or local version metadata unreadable.

Common situations: CI runners without internet egress; corporate proxies/firewalls blocking the update-check URL; GitHub rate limiting shared CI IPs; offline air-gapped environments with update checks still enabled.

Related errors


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