jdx/mise · error
remote target ' ' was selected more than once
Error message
remote target '{destination}' was selected more than once What it means
Each `--host [user@]host` value passed to remote bootstrap maps to an inventory entry keyed by host name. If two --host values resolve to the same host name (including duplicates of one value, or a host also selected via --tag/--all), mise detects the duplicate key collision in the `selected` map and errors.
Solutions
- Remove the duplicate --host entry
- Drop the --host when --tag or --all already selects that host
- Check the generated command line in scripts for repeated flags
Example fix
// before mise bootstrap remote --host web1 --host web1 --all // after mise bootstrap remote --host web1
Defensive patterns
Strategy: validation
Validate before calling
const hosts = [...allHostArgValues]; if (new Set(hosts).size !== hosts.length) throw new Error('duplicate --host'); Prevention
- Deduplicate --host values when building commands programmatically
- Don't combine --host with --tag/--all for the same machine
- Review generated CLI lines in CI logs
When it happens
Trigger: Passing the same --host twice (`--host a --host a`), or passing --host for a machine already matched by --tag or --all, so `HashMap::insert` returns Some.
Common situations: Scripting bootstrap with both an ad-hoc --host and a --tag that includes that host; redundant CLI args accumulated from config expansion.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- no remote targets configured; pass --host [user@]host or…
- select a remote target by name, --tag, or --all
- a repository preview directory requires a dry run
- bootstrap from repository failed with
- bootstrap plan contains resources with unknown state
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/05708f305d997858.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:3047
self.github_relay_log_format.as_deref(),
self.github_relay_max_duration.as_deref(),
)?;
if relay.is_some() && !cfg!(unix) {
bail!("GitHub relay requires Linux or macOS");
}
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 {
from_git: self.adopt.is_some(),
source: self.source,
mise_env: self.remote_env,View on GitHub (pinned to 533346cc37)