abiosoft/colima · error

error fetching remotes: %w

Error message

error fetching remotes: %w

What it means

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.

Source

Thrown at environment/container/incus/incus.go:363

	}

	return nil
}

func (c incusRuntime) hasRemote(name string) bool {
	remotes, err := c.fetchRemotes()
	if err != nil {
		return false
	}

	_, ok := remotes[name]
	return ok
}

func (c incusRuntime) fetchRemotes() (remoteInfo, error) {
	b, err := c.host.RunOutput("incus", "remote", "list", "--format", "json")
	if err != nil {
		return nil, fmt.Errorf("error fetching remotes: %w", err)
	}

	var remotes remoteInfo
	if err := json.NewDecoder(strings.NewReader(b)).Decode(&remotes); err != nil {
		return nil, fmt.Errorf("error decoding remotes response: %w", err)
	}

	return remotes, nil
}

func (c incusRuntime) isDefaultRemote() bool {
	remote, _ := c.host.RunOutput("incus", "remote", "get-default")
	return remote == config.CurrentProfile().ID
}

func (c incusRuntime) addDockerRemote() error {
	if c.hasRemote("docker") {
		// already added

View on GitHub (pinned to c3a5f9184d)

Solutions

  1. Verify on the host: 'incus remote list --format json' and read the actual error
  2. Ensure incus is installed and on PATH for the shell that launches colima
  3. Upgrade host incus to a current release that supports '--format json'
  4. Reinitialize host client config: 'incus remote list' once interactively, then retry colima
Defensive patterns

Strategy: validation

Validate before calling

// preflight: host incus client must exist and support --format json
if _, err := exec.LookPath("incus"); err != nil {
    return fmt.Errorf("host incus client not found on PATH")
}

Try / catch

b, err := c.host.RunOutput("incus", "remote", "list", "--format", "json")
if err != nil {
    return nil, fmt.Errorf("error fetching remotes: %w", err)
    // if stderr indicates 'unknown flag', the host incus is too old — upgrade it
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15). Data as JSON: /api/errors/c3457836f2fa4d59. Report an issue: GitHub.