{"record":{"id":"bfab2a5300793f96","repo":"jdx/mise","slug":"automatic-cross-platform-provisioning-is-unavailab","errorCode":null,"errorMessage":"automatic cross-platform provisioning is unavailable from a debug mise build; set mise_bin, remote_mise, or bootstrap_command","messagePattern":"automatic cross-platform provisioning is unavailable from a debug mise build; set mise_bin, remote_mise, or bootstrap_command","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1028,"sourceCode":"            return Err(error).wrap_err_with(|| {\n                format!(\"official mise release artifact {asset} failed verification\")\n            });\n        }\n        progress.finish();\n        info!(\n            \"using signed official mise {} artifact {asset}\",\n            env!(\"CARGO_PKG_VERSION\")\n        );\n        self.artifacts.insert(asset, path.clone());\n        Ok(path)\n    }\n\n    async fn ensure_official_local(&mut self, local: &Path) -> Result<()> {\n        if self.official_local_verified {\n            return Ok(());\n        }\n        if cfg!(debug_assertions) {\n            bail!(\n                \"automatic cross-platform provisioning is unavailable from a debug mise build; set mise_bin, remote_mise, or bootstrap_command\"\n            );\n        }\n        let local_os = normalize_os(std::env::consts::OS);\n        let local_arch = normalize_arch(std::env::consts::ARCH);\n        let candidates = official_release_assets(&local_os, &local_arch)?;\n        let actual = crate::hash::file_hash_sha256(local, None)?;\n        let manifest = self.manifest().await?;\n        let official = candidates.iter().any(|asset| {\n            manifest\n                .checksum(asset)\n                .is_ok_and(|expected| expected.eq_ignore_ascii_case(&actual))\n        });\n        if !official {\n            bail!(\n                \"automatic cross-platform provisioning refuses to replace a custom mise build with an official binary because {} does not match the signed mise {} release checksums; set mise_bin, remote_mise, or bootstrap_command\",\n                local.display(),\n                env!(\"CARGO_PKG_VERSION\")","sourceCodeStart":1010,"sourceCodeEnd":1046,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/remote.rs#L1010-L1046","documentation":"Thrown by RemoteArtifactResolver::ensure_official_local when mise needs to provision a remote host whose platform differs from the local one and none of mise_bin, remote_mise, or bootstrap_command is configured. Automatic provisioning works by downloading the official signed release artifact for the remote platform, and before doing that it verifies the running local binary against the minisign-verified SHASUMS256.txt manifest. A debug build (cfg!(debug_assertions), e.g. target/debug/mise from cargo run) can never match an official release checksum, so the check refuses up front instead of downloading the manifest and failing later.","triggerScenarios":"Running a debug-compiled mise (cargo run, target/debug/mise) and triggering remote/bootstrap against a host with a different OS/arch while [bootstrap.remote.hosts.<name>] sets none of mise_bin, remote_mise, or bootstrap_command.","commonSituations":"Contributors developing mise itself and testing the remote flow; CI pipelines that build unoptimized debug binaries; users of a locally checked-out repo running the binary from target/debug.","solutions":["Set one of mise_bin, remote_mise, or bootstrap_command on the host entry in [bootstrap.remote.hosts.<name>] so provisioning is explicit","Install and run an official mise release build (or cargo build --release of the same version) before using automatic cross-platform provisioning","If mise is already installed on the remote, set remote_mise = \"mise\" to skip provisioning entirely"],"exampleFix":"# before (mise.toml)\n[bootstrap.remote.hosts.ci]\nhost = \"ci@build-1\"\n\n# after\n[bootstrap.remote.hosts.ci]\nhost = \"ci@build-1\"\nremote_mise = \"mise\"  # or: bootstrap_command = \"curl https://mise.run | sh\", or mise_bin = \"./target/release/mise\"","handlingStrategy":"fallback","validationCode":"// Before running any remote flow, require explicit provisioning in dev builds\nlet automatic = host.mise_bin.is_none()\n    && host.remote_mise.is_none()\n    && host.bootstrap_command.is_none();\nif cfg!(debug_assertions) && automatic {\n    eyre::bail!(\n        \"debug builds cannot auto-provision; set mise_bin/remote_mise/bootstrap_command for host '{}'\",\n        host.name\n    );\n}","typeGuard":"fn has_explicit_provisioning(host: &RemoteHost) -> bool {\n    host.mise_bin.is_some() || host.remote_mise.is_some() || host.bootstrap_command.is_some()\n}","tryCatchPattern":"match run_remote(&host, &opts).await {\n    Err(e) if e.to_string().contains(\"debug mise build\") => {\n        // dev-only: skip or fall back to a host entry with explicit provisioning\n        warn_once!(\"host '{}' needs mise_bin/remote_mise/bootstrap_command in dev builds\", host.name);\n    }\n    other => other?,\n}","preventionTips":["In dev workflows, always configure mise_bin (e.g. ./target/release/mise) on test hosts","Gate cross-platform provisioning tests behind a release-built binary in CI","Document that cfg!(debug_assertions) builds cannot fetch official artifacts"],"tags":["mise","remote-bootstrap","debug-build","provisioning","ssh"],"backgroundTag":"debug-build-feature-unavailable","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}