jdx/mise · error
invalid remote global configuration path
Error message
invalid remote global configuration path
What it means
During `mise ssh` staging, mise runs the remote helper `mise ssh --global-config-directory` and expects a single absolute directory path for the trusted global config location. This error means the returned string was empty, relative, or contained newline/CR characters, so it cannot be trusted as a config directory path. mise throws it defensively because only this absolute path becomes trusted configuration on the remote host.
Solutions
- SSH into the host manually and run the provisioned mise with `ssh --global-config-directory` to inspect what it actually prints
- Update the remote mise helper binary to the current version so the subcommand emits a single absolute path
- Remove or fix profile/rc scripts on the host that print output during non-interactive shell commands
- Ensure MISE_CONFIG_DIR / XDG_CONFIG_HOME on the remote resolve to absolute directories
Example fix
// before: host profile prints banners on every non-interactive shell ~/.bashrc: echo "Welcome to $HOST" // after: guard interactive-only output ~/.bashrc: [[ $- == *i* ]] && echo "Welcome to $HOST"
Defensive patterns
Strategy: validation
Validate before calling
# on the host, before mise ssh out=$(mise ssh --global-config-directory | tr -d '\n\r') case "$out" in /*) echo "ok: $out";; *) echo "bad: $out"; exit 1;; esac
Prevention
- Keep remote mise helper binaries up to date
- Guard interactive-only echo statements in remote shell profiles
- Pin absolute XDG_CONFIG_HOME/MISE_CONFIG_DIR on remote hosts
When it happens
Trigger: Running a staged `mise ssh` bootstrap with a repository bundle (run_staged); the remote helper command `mise ssh --global-config-directory` outputs a path not starting with '/' or containing '\n' or '\r'.
Common situations: The remote mise binary is an old or differently-built version whose `ssh --global-config-directory` subcommand prints extra text, a relative path, or nothing; a shell profile on the host echoes output before the command result; MISE_CONFIG_DIR is misconfigured to a relative path on the remote.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- invalid remote
- local mise is / , while the remote target is
- remote bootstrap failed on
- remote cleanup failed with
- remote command on ' ' failed with
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/966ceb00c9429fc3.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:622
install.push("--repository-yes");
}
// the whole operation previews: the helper inspects the target and the
// repository and says what it would write, before the bootstrap preview
if options.dry_run {
install.push("--repository-dry-run");
}
if preview_setup {
install.extend(["--repository-preview-directory", &preview_directory]);
}
// The helper uses the target's XDG/global-config environment. Only its
// absolute result, never the staging directory, becomes trusted config.
let path = session
.output_async(&[&mise, "ssh", "--global-config-directory"])
.await?
.trim()
.to_string();
if !path.starts_with('/') || path.contains(['\n', '\r']) {
bail!("invalid remote global configuration path");
}
session.status_async(&install, true).await?;
if options.dry_run && !preview_setup && !remote_directory_exists(session, &path).await? {
// nothing was written, so there is no configuration to preview the
// bootstrap against yet
miseprintln!(
"Would then run `mise bootstrap --dry-run` in {path} on {} once the configuration exists there",
session.host.name
);
if options.relay.is_some() {
info!(
"borrowed GitHub access has ended; future private updates require remote credentials or another relay-enabled session"
);
}
return Ok(());
}
if preview_setup {
preview_directoryView on GitHub (pinned to 533346cc37)