jdx/mise · error

no remote targets configured; pass --host [user@]host or add

Error message

no remote targets configured; pass --host [user@]host or add [bootstrap.remote.hosts]

What it means

BootstrapRemote::run (src/cli/bootstrap.rs:2337) builds its inventory from [bootstrap.remote.hosts] in the loaded config; if that inventory is empty and no --host was passed, there is nothing to select and mise bails, telling you the two ways to supply a target.

Source

Thrown at src/cli/bootstrap.rs:2337

    async fn run(self) -> Result<()> {
        if self.connect_timeout == 0 {
            bail!("--connect-timeout must be greater than zero");
        }
        let config = Config::get().await?;
        let config_excludes = system::remote::excludes_from_config(&config);
        let inventory = system::remote::hosts_from_config(&config, &config_excludes)?;
        let mut selected = select_remote_inventory(&inventory, &self.targets, self.all, &self.tag)?;
        let ad_hoc_source = self.source.clone().unwrap_or(std::env::current_dir()?);
        for destination in &self.host {
            let host =
                system::remote::ad_hoc_host(destination, ad_hoc_source.clone(), &config_excludes)?;
            if selected.insert(host.name.clone(), host).is_some() {
                bail!("remote target '{destination}' was selected more than once");
            }
        }
        if selected.is_empty() {
            if inventory.is_empty() {
                bail!(
                    "no remote targets configured; pass --host [user@]host or add [bootstrap.remote.hosts]"
                );
            }
            bail!(
                "select a remote target by name, --tag, or --all (configured: {})",
                inventory.keys().cloned().collect::<Vec<_>>().join(", ")
            );
        }

        let overrides = system::remote::RemoteOverrides {
            source: self.source,
            port: self.port,
            identity_file: self.identity_file,
            exclude: self.exclude,
            ssh_options: self.ssh_option,
            mise_bin: self.mise_bin,
            remote_mise: self.remote_mise,
            bootstrap_command: self.bootstrap_command,

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Pass an ad-hoc target: 'mise bootstrap remote --host user@hostname'
  2. Add hosts under the exact table [bootstrap.remote.hosts.<name>] in mise.toml with host/user/source fields
  3. Run from the directory whose mise.toml defines the hosts, or point MISE_CONFIG_FILE at it
  4. Confirm the config loads: 'mise config' should list the file

Example fix

# before: no hosts configured anywhere
mise bootstrap remote
# Error: no remote targets configured; pass --host [user@]host or add [bootstrap.remote.hosts]

# after: mise.toml
[bootstrap.remote.hosts.web1]
host = 'web1.example.com'
user = 'deploy'

mise bootstrap remote web1
Defensive patterns

Strategy: validation

Validate before calling

# bash: require either --host or a configured inventory before running
if [ -z "$HOST_ARG" ] && ! grep -q 'bootstrap\.remote\.hosts' mise.toml 2>/dev/null; then
  echo 'no remote targets configured; pass --host or add [bootstrap.remote.hosts]' >&2
  exit 1
fi

Prevention

When it happens

Trigger: 'mise bootstrap remote' with no --host and no [bootstrap.remote.hosts] table in any loaded mise.toml; running outside the project directory so the config defining hosts never loads; hosts written under a wrong TOML key.

Common situations: First run before any remote host is configured; wrong cwd (or MISE_CONFIG_FILE not set) so the config set is empty; schema drift from docs (e.g. [bootstrap.hosts] instead of [bootstrap.remote.hosts]).

Related errors


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