{"record":{"id":"c3457836f2fa4d59","repo":"abiosoft/colima","slug":"error-fetching-remotes-w","errorCode":null,"errorMessage":"error fetching remotes: %w","messagePattern":"error fetching remotes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"environment/container/incus/incus.go","lineNumber":363,"sourceCode":"\t}\n\n\treturn nil\n}\n\nfunc (c incusRuntime) hasRemote(name string) bool {\n\tremotes, err := c.fetchRemotes()\n\tif err != nil {\n\t\treturn false\n\t}\n\n\t_, ok := remotes[name]\n\treturn ok\n}\n\nfunc (c incusRuntime) fetchRemotes() (remoteInfo, error) {\n\tb, err := c.host.RunOutput(\"incus\", \"remote\", \"list\", \"--format\", \"json\")\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error fetching remotes: %w\", err)\n\t}\n\n\tvar remotes remoteInfo\n\tif err := json.NewDecoder(strings.NewReader(b)).Decode(&remotes); err != nil {\n\t\treturn nil, fmt.Errorf(\"error decoding remotes response: %w\", err)\n\t}\n\n\treturn remotes, nil\n}\n\nfunc (c incusRuntime) isDefaultRemote() bool {\n\tremote, _ := c.host.RunOutput(\"incus\", \"remote\", \"get-default\")\n\treturn remote == config.CurrentProfile().ID\n}\n\nfunc (c incusRuntime) addDockerRemote() error {\n\tif c.hasRemote(\"docker\") {\n\t\t// already added","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/abiosoft/colima/blob/c3a5f9184d83a197184f897a9f07eb3c01b3bc88/environment/container/incus/incus.go#L345-L381","documentation":"Colima runs 'incus remote list --format json' on the HOST (not the guest) to inspect configured OCI remotes, and the host command failed. The most common cause is the incus client binary missing from PATH on the host, or a host-side incus installation problem.","triggerScenarios":"c.host.RunOutput(\"incus\", \"remote\", \"list\", \"--format\", \"json\") errors: 'incus' not installed/on PATH on the host, incus client config dir (~/.config/incus) unreadable, or an incus version without --format json.","commonSituations":"Host incus installed via a method that is not on PATH (e.g. only in /usr/local/bin for another shell), upgrading host incus to a version with changed CLI flags, corrupted host client certs.","solutions":["Verify on the host: 'incus remote list --format json' and read the actual error","Ensure incus is installed and on PATH for the shell that launches colima","Upgrade host incus to a current release that supports '--format json'","Reinitialize host client config: 'incus remote list' once interactively, then retry colima"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// preflight: host incus client must exist and support --format json\nif _, err := exec.LookPath(\"incus\"); err != nil {\n    return fmt.Errorf(\"host incus client not found on PATH\")\n}","typeGuard":null,"tryCatchPattern":"b, err := c.host.RunOutput(\"incus\", \"remote\", \"list\", \"--format\", \"json\")\nif err != nil {\n    return nil, fmt.Errorf(\"error fetching remotes: %w\", err)\n    // if stderr indicates 'unknown flag', the host incus is too old — upgrade it\n}","preventionTips":["Install the incus client on the host and keep it on PATH for your shell/launcher","Pin host incus to a version compatible with your colima release","Run 'incus remote list' once manually to confirm a healthy client config"],"tags":["incus","host","cli","path"],"backgroundTag":null,"analyzedSha":"c3a5f9184d83a197184f897a9f07eb3c01b3bc88","analyzedAt":"2026-08-15T18:58:08.334Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}