{"record":{"id":"3a2c7022b2f1e0c9","repo":"jdx/mise","slug":"github-relay-requires-a-posix-target","errorCode":null,"errorMessage":"GitHub relay requires a POSIX target: {}","messagePattern":"GitHub relay requires a POSIX target: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/ssh.rs","lineNumber":171,"sourceCode":"        )?;\n        if let Some(socket) = self.relay_session {\n            if scope.is_some() {\n                bail!(\"cannot nest relay sessions\");\n            }\n            #[cfg(unix)]\n            {\n                crate::ui::ctrlc::exit_on_ctrl_c(false);\n                let mut command = self.command;\n                if let Some(first) = self.destination {\n                    command.insert(0, first);\n                }\n                return crate::system::remote::interruptible(crate::github_relay::unix::session(\n                    &socket, command,\n                ))\n                .await;\n            }\n            #[cfg(not(unix))]\n            bail!(\"GitHub relay requires a POSIX target: {}\", socket.display());\n        }\n        let destination = self\n            .destination\n            .ok_or_else(|| eyre::eyre!(\"an SSH destination is required\"))?;\n        if let Some(scope) = scope {\n            #[cfg(unix)]\n            {\n                let mut host = crate::system::remote::ad_hoc_host(\n                    &destination,\n                    std::env::current_dir()?,\n                    &[],\n                )?;\n                host.port = self.port;\n                host.identity_file = self.identity_file;\n                host.ssh_options = self.ssh_option;\n                return crate::system::remote::ssh(&host, scope, &self.command).await;\n            }\n            #[cfg(not(unix))]","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/ssh.rs#L153-L189","documentation":"The GitHub relay session implementation (`github_relay::unix::session`) only exists on Unix (POSIX) targets, using Unix domain sockets. On non-Unix builds mise refuses to create the relay and reports the socket path that would have been used.","triggerScenarios":"Compiling/running a non-`unix` target (e.g. Windows) of mise and invoking `mise ssh --relay-session <socket>`.","commonSituations":"Running the relay feature from Windows or another non-POSIX platform; running a Windows-built mise binary where Unix socket support is unavailable.","solutions":["Run this command on Linux or macOS where Unix domain sockets are supported.","Use WSL on Windows to get a POSIX environment for the relay.","Fall back to plain `mise ssh` without --relay-session."],"exampleFix":"// before (Windows cmd)\nmise ssh --relay-session \\\\.\\pipe\\relay host\n// after (WSL)\nwsl\nmise ssh --relay-session /tmp/relay.sock host","handlingStrategy":"validation","validationCode":"if (process.platform === 'win32' && args.includes('--relay-session')) { throw new Error('--relay-session requires POSIX; use WSL or plain ssh'); }","typeGuard":"const isPosix = (p) => p === 'linux' || p === 'darwin' || p !== 'win32' && p !== 'win32';\nconst posixOk = (p) => ['linux','darwin','freebsd','openbsd'].includes(p);","tryCatchPattern":"try { await run('mise ssh --relay-session ...') } catch (e) { if (String(e).includes('requires a POSIX target')) { /* fall back to plain ssh */ } }","preventionTips":["Gate relay features on process.platform in scripts","Use WSL for POSIX-only mise features on Windows","Document platform requirements for relay users"],"tags":["cli","ssh","relay","platform"],"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"}