{"record":{"id":"1d0a30c613685878","repo":"jdx/mise","slug":"remote-host-must-set-at-most-one-of-mise-bin","errorCode":null,"errorMessage":"remote host '{}' must set at most one of mise_bin, remote_mise, or bootstrap_command","messagePattern":"remote host '(.+?)' must set at most one of mise_bin, remote_mise, or bootstrap_command","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":369,"sourceCode":"        if let Some(binary) = &self.mise_bin\n            && !binary.is_file()\n        {\n            bail!(\n                \"remote host '{}' mise binary does not exist: {}\",\n                self.name,\n                binary.display()\n            );\n        }\n        let provisioning_strategies = [\n            self.mise_bin.is_some(),\n            self.remote_mise.is_some(),\n            self.bootstrap_command.is_some(),\n        ]\n        .into_iter()\n        .filter(|configured| *configured)\n        .count();\n        if provisioning_strategies > 1 {\n            bail!(\n                \"remote host '{}' must set at most one of mise_bin, remote_mise, or bootstrap_command\",\n                self.name\n            );\n        }\n        if let Some(install_mise) = &self.install_mise {\n            if self.remote_mise.is_some() || self.bootstrap_command.is_some() {\n                bail!(\n                    \"remote host '{}' cannot combine install_mise with remote_mise or bootstrap_command, which already provide mise on the host\",\n                    self.name\n                );\n            }\n            validate_install_mise_path(install_mise).wrap_err_with(|| {\n                format!(\"remote host '{}' has an invalid install_mise\", self.name)\n            })?;\n        }\n        for option in &self.ssh_options {\n            validate_value(\"SSH option\", option)?;\n        }","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L351-L387","documentation":"A remote host may specify at most one way to obtain mise on the remote machine: a local mise_bin, a remote_mise path already on the host, or a bootstrap_command. validate_with_source counts how many of these are configured and bails when more than one is set, because the provisioning strategies conflict.","triggerScenarios":"A remote host entry sets two or more of mise_bin, remote_mise, bootstrap_command simultaneously; validate() or apply_overrides() detect provisioning_strategies > 1 and bail.","commonSituations":"Merging host config snippets from different setups; adding remote_mise on top of an existing bootstrap_command while iterating; copy-pasting a full example block that sets several fields.","solutions":["Pick one provisioning strategy and delete the other fields from the host entry.","If mise already exists on the host, keep only remote_mise and remove mise_bin/bootstrap_command.","If you want to upload a local binary, keep only mise_bin.","If you need custom setup steps, keep only bootstrap_command."],"exampleFix":"// before\n[[remote_host]]\nname = \"builder\"\nremote_mise = \"/usr/local/bin/mise\"\nbootstrap_command = \"curl https://mise.run | sh\"\n// after\n[[remote_host]]\nname = \"builder\"\nremote_mise = \"/usr/local/bin/mise\"","handlingStrategy":"validation","validationCode":"function assertSingleStrategy(host) {\n  const set = ['mise_bin', 'remote_mise', 'bootstrap_command'].filter(k => host[k] != null);\n  if (set.length > 1) throw new Error(`remote host '${host.name}' sets multiple provisioning strategies: ${set}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize on one provisioning strategy across all host entries.","Review merged config diffs for duplicated provisioning fields.","Document the chosen strategy (e.g. remote_mise only) in team config guidelines."],"tags":["remote","configuration","validation","conflicting-options"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}