jdx/mise · error
GitHub relay requires a POSIX target
Error message
GitHub relay requires a POSIX target: {} What it means
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.
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.
Example fix
// before (Windows cmd) mise ssh --relay-session \\.\pipe\relay host // after (WSL) wsl mise ssh --relay-session /tmp/relay.sock host
Defensive patterns
Strategy: validation
Validate before calling
if (process.platform === 'win32' && args.includes('--relay-session')) { throw new Error('--relay-session requires POSIX; use WSL or plain ssh'); } Type guard
const isPosix = (p) => p === 'linux' || p === 'darwin' || p !== 'win32' && p !== 'win32'; const posixOk = (p) => ['linux','darwin','freebsd','openbsd'].includes(p);
Try / catch
try { await run('mise ssh --relay-session ...') } catch (e) { if (String(e).includes('requires a POSIX target')) { /* fall back to plain ssh */ } } Prevention
- Gate relay features on process.platform in scripts
- Use WSL for POSIX-only mise features on Windows
- Document platform requirements for relay users
When it happens
Trigger: Compiling/running a non-`unix` target (e.g. Windows) of mise and invoking `mise ssh --relay-session <socket>`.
Common situations: Running the relay feature from Windows or another non-POSIX platform; running a Windows-built mise binary where Unix socket support is unavailable.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- cannot nest relay sessions
- GitHub relay requires Linux or macOS
- a repository preview directory requires a dry run
- brew import is not supported on windows
- cannot set up from a setup repository
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3a2c7022b2f1e0c9.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/ssh.rs:171
)?;
if let Some(socket) = self.relay_session {
if scope.is_some() {
bail!("cannot nest relay sessions");
}
#[cfg(unix)]
{
crate::ui::ctrlc::exit_on_ctrl_c(false);
let mut command = self.command;
if let Some(first) = self.destination {
command.insert(0, first);
}
return crate::system::remote::interruptible(crate::github_relay::unix::session(
&socket, command,
))
.await;
}
#[cfg(not(unix))]
bail!("GitHub relay requires a POSIX target: {}", socket.display());
}
let destination = self
.destination
.ok_or_else(|| eyre::eyre!("an SSH destination is required"))?;
if let Some(scope) = scope {
#[cfg(unix)]
{
let mut host = crate::system::remote::ad_hoc_host(
&destination,
std::env::current_dir()?,
&[],
)?;
host.port = self.port;
host.identity_file = self.identity_file;
host.ssh_options = self.ssh_option;
return crate::system::remote::ssh(&host, scope, &self.command).await;
}
#[cfg(not(unix))]View on GitHub (pinned to 533346cc37)