{"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":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/bootstrap.rs","lineNumber":3033,"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":3015,"sourceCodeEnd":3051,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/bootstrap.rs#L3015-L3051","documentation":"The `--github-relay` option for remote bootstrap is only implemented on Unix platforms. When a relay is configured and the binary was built for a non-Unix target (e.g. Windows), `cfg!(unix)` is false and mise refuses to proceed.","triggerScenarios":"Running `mise bootstrap remote --github-relay ...` (any option that yields relay.is_some()) on a Windows build.","commonSituations":"Windows developers driving remote Linux deployments via mise and requesting the GitHub relay tunnel, which the codebase only supports on Linux/macOS.","solutions":["Run the bootstrap from a Linux or macOS host (e.g. WSL is not applicable since cfg!(unix) is still false in native Windows builds — use a real Unix shell/environment)","Remove the GitHub relay options and let hosts access GitHub directly","Build/run mise inside WSL2, where the Unix build supports the relay"],"exampleFix":"// before (Windows cmd)\nmise bootstrap remote --host build@server --github-relay ... // errors\n// after (WSL2/Linux)\nmise bootstrap remote --host build@server --github-relay ...","handlingStrategy":"validation","validationCode":"if process.platform === 'win32' && args.includes('--github-relay') { throw new Error('github-relay is unix-only') }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run remote bootstrap from a Linux/macOS host","Feature-detect OS before adding --github-relay flags in scripts","Document relay limitations for Windows-based teammates"],"tags":["platform","windows","bootstrap","github"],"backgroundTag":"unsupported-platform","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"}