jdx/mise · error
GitHub relay requires a POSIX target: {}
Error message
GitHub relay requires a POSIX target: {} What it means
The GitHub relay feature of `mise ssh` is implemented only for POSIX (Unix) platforms (src/cli/ssh.rs:170). When relay is requested on a non-Unix target (e.g. Windows), the `#[cfg(not(unix))]` branch bails, including the relay socket path in the message.
Source
Thrown at src/cli/ssh.rs:170
)?;
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 afd2eddd3a)
Solutions
- Run the relay command on Linux or macOS.
- Remove the relay flags on Windows and use plain SSH without GitHub relay.
- Wrap relay usage with an OS check in scripts (e.g. only pass relay flags when `uname` is Linux/Darwin).
Example fix
// before (any OS) mise ssh host --github-relay ... // after (script guard) if [ "$(uname -s)" = Linux ] || [ "$(uname -s)" = Darwin ]; then mise ssh host --github-relay ...; else mise ssh host; fi
Defensive patterns
Strategy: validation
Validate before calling
const relaySupported = process.platform === 'linux' || process.platform === 'darwin';
if (wantRelay && !relaySupported) throw new Error('GitHub relay requires Linux or macOS'); Prevention
- Gate relay flags on OS detection in scripts.
- Document that relay is POSIX-only for the team.
- Keep Windows CI jobs on plain ssh paths.
When it happens
Trigger: Running any `mise ssh` command with GitHub relay options (`--relay-session` or relay scope) on a non-Unix build (Windows), where the unix-only relay session module is compiled out.
Common situations: Using mise ssh relay from Windows or Windows-targeted binaries; cross-platform scripts that unconditionally pass relay flags; CI runners on Windows executing the same relay command used on macOS/Linux.
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
- GitHub relay requires Linux or macOS
- only available on unix
- cannot nest relay sessions
- brew import is not supported on windows
- OCI system package layers with symlinks require a unix host
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/3a2c7022b2f1e0c9.
Report an issue: GitHub.