jdx/mise · error

remote host '{}' must set at most one of mise_bin, remote_mi

Error message

remote host '{}' must set at most one of mise_bin, remote_mise, or bootstrap_command

What it means

Thrown by RemoteHost::validate() when a host defines more than one of the three mutually exclusive mise provisioning strategies: mise_bin (upload a local binary), remote_mise (use an existing remote executable), and bootstrap_command (a shell command that installs mise). mise must pick exactly one strategy per host, so configuring two or three is ambiguous and is rejected before any SSH connection is opened. The message names the offending host from [bootstrap.remote.hosts].

Source

Thrown at src/system/remote.rs:271

        if let Some(binary) = &self.mise_bin
            && !binary.is_file()
        {
            bail!(
                "remote host '{}' mise binary does not exist: {}",
                self.name,
                binary.display()
            );
        }
        let provisioning_strategies = [
            self.mise_bin.is_some(),
            self.remote_mise.is_some(),
            self.bootstrap_command.is_some(),
        ]
        .into_iter()
        .filter(|configured| *configured)
        .count();
        if provisioning_strategies > 1 {
            bail!(
                "remote host '{}' must set at most one of mise_bin, remote_mise, or bootstrap_command",
                self.name
            );
        }
        for option in &self.ssh_options {
            validate_value("SSH option", option)?;
        }
        for exclude in &self.exclude {
            validate_value("archive exclude", exclude)?;
        }
        if let Some(remote_mise) = &self.remote_mise {
            validate_remote_executable(remote_mise)?;
        }
        if self
            .bootstrap_command
            .as_ref()
            .is_some_and(|command| command.contains('\0'))
        {

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Open mise.toml, find the host named in the error, and keep exactly one of mise_bin, remote_mise, or bootstrap_command; delete the others
  2. Check layered config files (mise.toml, mise.local.toml, ~/.config/mise/mise.toml, MISE_CONFIG_FILE) since later files merge into the same host entry
  3. If overriding on the command line, pass only one of --mise-bin / --remote-mise / --bootstrap-command (clap rejects combinations anyway)
  4. Re-run mise bootstrap remote <host> to confirm the host entry validates

Example fix

# before (mise.toml)
[bootstrap.remote.hosts.build]
host = "build.internal"
remote_mise = "mise"
bootstrap_command = "curl https://mise.run | sh"

# after
[bootstrap.remote.hosts.build]
host = "build.internal"
bootstrap_command = "curl https://mise.run | sh"
Defensive patterns

Strategy: validation

Validate before calling

# before running: confirm the host sets at most one strategy
python3 - <<'EOF'
import tomllib, sys
cfg = tomllib.load(open("mise.toml", "rb"))
for name, host in cfg.get("bootstrap", {}).get("remote", {}).get("hosts", {}).items():
    keys = [k for k in ("mise_bin", "remote_mise", "bootstrap_command") if k in host]
    if len(keys) > 1:
        sys.exit(f"host '{name}' sets multiple strategies: {keys}")
print("ok")
EOF

Try / catch

if let Err(e) = remote::hosts_from_config(&config, &excludes) {
    if e.to_string().contains("must set at most one of mise_bin") {
        // fix the named host's config and re-run; do not retry unchanged
    }
}

Prevention

When it happens

Trigger: A mise.toml [bootstrap.remote.hosts.<name>] block that sets two of the keys, e.g. remote_mise = "mise" together with bootstrap_command = "curl ... | sh", or mise_bin plus remote_mise. The check counts configured options in validate(), which runs from hosts_from_config(), ad_hoc_host(), and apply_overrides(). The CLI flags themselves already conflict via clap conflicts_with_all, so this path mostly catches config files and layered config merging.

Common situations: Iterating on provisioning: starting with remote_mise, later pasting a bootstrap_command snippet and forgetting to remove the old key; copy-pasting a host template that shows all three keys with two left uncommented; layered config (project mise.toml plus ~/.config/mise/mise.toml) merging extra keys into the same host entry.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/1d0a30c613685878. Report an issue: GitHub.