jdx/mise · error

remote bootstrap configuration is invalid for {} target(s):

Error message

remote bootstrap configuration is invalid for {} target(s):
  {}

What it means

Before any host is contacted, each selected RemoteHost gets apply_overrides() with the CLI overrides (source, port, identity file, excludes, ssh options, mise bin). Hosts whose overrides fail validation are collected and reported together (src/cli/bootstrap.rs:2375) - nothing has executed yet; this is purely local configuration validation.

Source

Thrown at src/cli/bootstrap.rs:2375

        let options = system::remote::RemoteRunOptions {
            dry_run: self.dry_run,
            yes: self.yes,
            update: self.update,
            prompt_secrets: self.prompt_secrets,
            force_dotfiles: self.force_dotfiles,
            skip: self.skip.iter().map(bootstrap_part_name).collect(),
            only: self.only.iter().map(bootstrap_part_name).collect(),
            keep_staging: self.keep_staging,
            connect_timeout: self.connect_timeout,
        };
        let mut configuration_errors = vec![];
        for host in selected.values_mut() {
            if let Err(error) = host.apply_overrides(&overrides) {
                configuration_errors.push(format!("{}: {error:#}", host.name));
            }
        }
        if !configuration_errors.is_empty() {
            bail!(
                "remote bootstrap configuration is invalid for {} target(s):\n  {}",
                configuration_errors.len(),
                configuration_errors.join("\n  ")
            );
        }
        let mut failures = vec![];
        let mut artifacts = system::remote::RemoteArtifactResolver::default();
        for host in selected.values() {
            if let Err(error) = system::remote::run(host, &options, &mut artifacts).await {
                error!("remote bootstrap failed on {}: {error:#}", host.name);
                failures.push(format!("{}: {error:#}", host.name));
                if self.fail_fast {
                    break;
                }
            }
        }
        if !failures.is_empty() {
            bail!(

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Read each 'name: error' line and fix the first concrete cause (bad port, missing key, bad path)
  2. Make --source an absolute path that exists on the controlling machine
  3. Verify the identity file exists and has sane permissions (600)
  4. Iterate on a single host ('mise bootstrap remote <name> ...') until overrides validate, then fan out

Example fix

# before
mise bootstrap remote web1 --identity-file ~/deploy_ed25519 --source ./repo
# Error: remote bootstrap configuration is invalid for 1 target(s): web1: ...

# after
mise bootstrap remote web1 --identity-file ~/.ssh/deploy_ed25519 --source "$PWD/repo"
Defensive patterns

Strategy: validation

Validate before calling

# bash: pre-validate overrides the same way mise does
[ -n "$SOURCE" ] && [ -d "$SOURCE" ] || { echo "--source missing: $SOURCE" >&2; exit 1; }
[ -z "$PORT" ] || [ "$PORT" -gt 0 ] 2>/dev/null || { echo "bad port: $PORT" >&2; exit 1; }
[ -z "$IDENTITY" ] || [ -f "$IDENTITY" ] || { echo "identity file missing: $IDENTITY" >&2; exit 1; }

Prevention

When it happens

Trigger: --port with a non-numeric or out-of-range value; --identity-file pointing at a missing key; --source path that does not exist (ad-hoc hosts default source to the cwd); invalid ssh-option strings; per-host config values that become inconsistent once overrides apply.

Common situations: CI without the deploy key checked out; relative --source resolved against an unexpected cwd; cross-OS path mismatches between controller and hosts.

Related errors


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