abiosoft/colima · error
failed to fetch releases: %w
Error message
failed to fetch releases: %w
What it means
getLatestRamalamaVersion does an HTTP GET to https://api.github.com/repos/containers/ramalama/releases/latest with a 10s client timeout; client.Get returning an error wraps into this message. The request never completed: DNS failure, no route to api.github.com, TLS/proxy interception, or exceeding the 10s timeout. (HTTP-level failures like 403 rate limits are a different, status-code error.)
Source
Thrown at model/ramalama.go:45
guest := lima.New(host.New())
output, err := guest.RunOutput("sh", "-c", `export PATH="$HOME/.local/bin:$PATH"; ramalama version 2>/dev/null`)
if err != nil {
return ""
}
// Output format: "ramalama version 0.17.1"
output = strings.TrimSpace(output)
if version, ok := strings.CutPrefix(output, "ramalama version "); ok {
return version
}
return ""
}
// getLatestRamalamaVersion fetches the latest release version from GitHub.
func getLatestRamalamaVersion() (string, error) {
client := &http.Client{Timeout: 10 * time.Second}
resp, err := client.Get(ramalamaReleasesURL)
if err != nil {
return "", fmt.Errorf("failed to fetch releases: %w", err)
}
defer func() { _ = resp.Body.Close() }()
if resp.StatusCode != http.StatusOK {
return "", fmt.Errorf("unexpected status code: %d", resp.StatusCode)
}
var release struct {
TagName string `json:"tag_name"`
}
if err := json.NewDecoder(resp.Body).Decode(&release); err != nil {
return "", fmt.Errorf("failed to decode response: %w", err)
}
// Tag might be "v0.17.1" or "0.17.1"
version := strings.TrimPrefix(release.TagName, "v")
return version, nil
}View on GitHub (pinned to c3a5f9184d)
Solutions
- Verify reachability: curl -sS https://api.github.com/repos/containers/ramalama/releases/latest
- Configure the proxy for the colima process (HTTPS_PROXY/HTTP_PROXY/NO_PROXY) and retry
- Fix DNS (resolv.conf / VPN split-DNS) if the host cannot resolve api.github.com
- If the network is intentionally restricted, skip the version check and use the already-installed ramalama; on slow links, raise the 10s client timeout
Example fix
// before
client := &http.Client{Timeout: 10 * time.Second}
resp, err := client.Get(ramalamaReleasesURL)
// after: honor proxy env explicitly and allow a longer timeout
client := &http.Client{
Timeout: 30 * time.Second,
Transport: &http.Transport{Proxy: http.ProxyFromEnvironment},
}
resp, err := client.Get(ramalamaReleasesURL) Defensive patterns
Strategy: fallback
Validate before calling
// Quick connectivity probe before the real fetch.
func githubReachable() bool {
c := &http.Client{Timeout: 3 * time.Second}
resp, err := c.Get("https://api.github.com")
if err != nil { return false }
_ = resp.Body.Close()
return true
} Try / catch
latest, err := getLatestRamalamaVersion()
if err != nil {
// offline / firewalled: fall back to what's installed rather than failing setup
log.Warnf("could not fetch latest ramalama version: %v; using installed version", err)
latest = GetRamalamaVersion() // may be "" -> skip upgrade decision
} Prevention
- Set HTTPS_PROXY/HTTP_PROXY for the colima process in corporate networks
- Treat the latest-version lookup as optional: never let it hard-fail setup when a local version exists
- Cache the last-known release tag so repeated runs work offline
- Use a generous HTTP timeout on slow links; 10s can be tight for api.github.com
When it happens
Trigger: Offline machine or firewalled CI blocking api.github.com; corporate proxy not configured (HTTPS_PROXY unset for the process); broken DNS; GitHub unreachable or the request exceeding the fixed 10-second timeout on slow links.
Common situations: Air-gapped or proxied enterprise environments; CI runners with restricted egress; flaky mobile/tethered networks; DNS breakage in VMs or containers running colima.
Related errors
- unexpected status code: %d
- error provisioning %s: %w
- error getting qcow image: %w
- error during image download: %w
- failed to decode response: %w
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/e49feb518d1de55e.
Report an issue: GitHub.