{"record":{"id":"6198026331da5bc0","repo":"jdx/mise","slug":"github-relay-requires-linux-or-macos","errorCode":null,"errorMessage":"GitHub relay requires Linux or macOS","messagePattern":"GitHub relay requires Linux or macOS","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":3043,"sourceCode":"\nimpl BootstrapRemote {\n    async fn run(mut self) -> Result<()> {\n        normalize_adopt_alias(&mut self.adopt, self.from_git.take());\n        crate::ui::ctrlc::exit_on_ctrl_c(false);\n        let relay = crate::github_relay::Scope::from_flags(\n            self.github_relay_read_only,\n            &self.github_relay_repo,\n            self.github_relay_all_repos,\n        )?;\n        let relay = crate::github_relay::configure(\n            relay,\n            self.github_relay_log_requests,\n            self.github_relay_no_log_requests,\n            self.github_relay_log_format.as_deref(),\n            self.github_relay_max_duration.as_deref(),\n        )?;\n        if relay.is_some() && !cfg!(unix) {\n            bail!(\"GitHub relay requires Linux or macOS\");\n        }\n        if self.connect_timeout == 0 {\n            bail!(\"--connect-timeout must be greater than zero\");\n        }\n        let config = Config::get().await?;\n        let config_excludes = system::remote::excludes_from_config(&config);\n        let inventory = system::remote::hosts_from_config(&config, &config_excludes)?;\n        let mut selected = select_remote_inventory(&inventory, &self.targets, self.all, &self.tag)?;\n        let ad_hoc_source = self.source.clone().unwrap_or(std::env::current_dir()?);\n        for destination in &self.host {\n            let host =\n                system::remote::ad_hoc_host(destination, ad_hoc_source.clone(), &config_excludes)?;\n            if selected.insert(host.name.clone(), host).is_some() {\n                bail!(\"remote target '{destination}' was selected more than once\");\n            }\n        }\n        if selected.is_empty() {\n            if inventory.is_empty() {","sourceCodeStart":3025,"sourceCodeEnd":3061,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/bootstrap.rs#L3025-L3061","documentation":"Thrown by the remote bootstrap command when a GitHub relay is requested (`github_relay` options produce `Some(relay)`) but the build/platform is not unix (Windows). The relay implementation only supports Linux and macOS, so mise refuses to start the remote bootstrap with relay enabled.","triggerScenarios":"Running a remote bootstrap command with `--github-relay ...` (and any of the relay log/format/duration options) on a non-unix platform, where `cfg!(unix)` evaluates to false.","commonSituations":"Windows developers attempting to relay GitHub access to remote bootstrap hosts; WSL quirk resolved by using native Linux; CI images on Windows attempting relay-enabled bootstrap.","solutions":["Run the remote bootstrap from a Linux or macOS machine (or WSL, which reports unix).","Drop the GitHub relay flags and configure GitHub access on the remote hosts directly (tokens/ssh).","Use a Linux CI runner for relay-enabled bootstrap runs."],"exampleFix":"// before (Windows)\nmise bootstrap remote --github-relay ... --host deploy@example.com\n// after (WSL/Linux)\nwsl mise bootstrap remote --github-relay ... --host deploy@example.com","handlingStrategy":"validation","validationCode":"case \"$(uname -s)\" in\n  Linux|Darwin) relay_flags=(\"--github-relay\" \"on\") ;;\n  *) relay_flags=() ; echo \"github relay unsupported here; skipping\" ;;\nesac\nmise bootstrap remote \"${relay_flags[@]}\" --host deploy@example.com","typeGuard":null,"tryCatchPattern":"if [[ \"$(uname -s)\" != Linux && \"$(uname -s)\" != Darwin ]]; then\n  echo \"run from Linux/macOS or configure remote GitHub access without relay\" >&2\n  exit 1\nfi","preventionTips":["Gate relay flags on `uname -s` in scripts","Use WSL instead of native Windows for relay-enabled runs","Configure direct GitHub credentials on remote hosts to avoid needing the relay"],"tags":["platform","unsupported-platform","github-relay"],"backgroundTag":"unsupported-platform","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}