jdx/mise · error
remote host ' ' identity file does not exist
Error message
remote host '{}' identity file does not exist: {} What it means
A configured SSH identity file for the remote host must exist on the local machine; validate_with_source stats the path and bails when identity_file is set but not an existing regular file. This fails fast before attempting any SSH connection.
Solutions
- Generate the key if missing: ssh-keygen -t ed25519 -f <path>.
- Fix the path (absolute path avoids ~ expansion issues) in the remote host config.
- Copy the private key to this machine with correct permissions (chmod 600).
- Remove the identity_file key to fall back to ssh-agent/default keys.
Example fix
// before identity_file = "~/.ssh/old_key_ed25519" // after identity_file = "/home/user/.ssh/id_ed25519"
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
function assertIdentityFile(host) {
if (host.identity_file && !fs.statSync(host.identity_file).isFile()) {
throw new Error(`identity file missing: ${host.identity_file}`);
}
} Prevention
- Use absolute, fully expanded paths for identity files (avoid ~ in generated config).
- Point at the private key, never the .pub file.
- Provision keys with a setup script (ssh-keygen + chmod 600) before remote operations.
- Prefer ssh-agent and omit identity_file when the key is already loaded.
When it happens
Trigger: A remote host entry sets `identity_file = "..."` and the path is missing or is a directory; validate() or apply_overrides() run the check and bail.
Common situations: Key generated on another machine and never copied; path typo or `~` not expanded as expected; key file deleted by cleanup tooling; pointing at a .pub public key that was rotated out; copying config between machines with different HOME.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- remote host ' ' mise binary does not exist
- remote host ' ' port must be greater than zero
- invalid remote global configuration path
- invalid remote
- local mise is / , while the remote target is
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/803cbc8828b12e43.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:345
}
if archive && !self.source.is_dir() {
bail!(
"remote host '{}' source is not a directory: {}",
self.name,
self.source.display()
);
}
if archive && !self.copy_links {
for link in &self.copy_link {
validate_copy_link(&self.source, link).wrap_err_with(|| {
format!("remote host '{}' has invalid copy_link", self.name)
})?;
}
}
if let Some(identity) = &self.identity_file
&& !identity.is_file()
{
bail!(
"remote host '{}' identity file does not exist: {}",
self.name,
identity.display()
);
}
if let Some(binary) = &self.mise_bin
&& !binary.is_file()
{
bail!(
"remote host '{}' mise binary does not exist: {}",
self.name,
binary.display()
);
}
let provisioning_strategies = [
self.mise_bin.is_some(),
self.remote_mise.is_some(),
self.bootstrap_command.is_some(),View on GitHub (pinned to 533346cc37)