{"record":{"id":"803cbc8828b12e43","repo":"jdx/mise","slug":"remote-host-identity-file-does-not-exist","errorCode":null,"errorMessage":"remote host '{}' identity file does not exist: {}","messagePattern":"remote host '(.+?)' identity file does not exist: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":345,"sourceCode":"        }\n        if archive && !self.source.is_dir() {\n            bail!(\n                \"remote host '{}' source is not a directory: {}\",\n                self.name,\n                self.source.display()\n            );\n        }\n        if archive && !self.copy_links {\n            for link in &self.copy_link {\n                validate_copy_link(&self.source, link).wrap_err_with(|| {\n                    format!(\"remote host '{}' has invalid copy_link\", self.name)\n                })?;\n            }\n        }\n        if let Some(identity) = &self.identity_file\n            && !identity.is_file()\n        {\n            bail!(\n                \"remote host '{}' identity file does not exist: {}\",\n                self.name,\n                identity.display()\n            );\n        }\n        if let Some(binary) = &self.mise_bin\n            && !binary.is_file()\n        {\n            bail!(\n                \"remote host '{}' mise binary does not exist: {}\",\n                self.name,\n                binary.display()\n            );\n        }\n        let provisioning_strategies = [\n            self.mise_bin.is_some(),\n            self.remote_mise.is_some(),\n            self.bootstrap_command.is_some(),","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/remote.rs#L327-L363","documentation":"Thrown by `RemoteHostConfig::validate_with_source` when a remote host entry specifies an `identity_file` for SSH that does not exist as a file on the local machine. mise checks this eagerly so the SSH/rsync invocation does not fail later with a cryptic permission or identity error.","triggerScenarios":"Setting `identity_file` in a remote host config to a path that is missing, deleted, mis-typed, or points to a directory; triggered by `validate` or `apply_overrides` before any connection is attempted.","commonSituations":"Key regenerated or rotated and old path removed; wrong user home in the path; config copied from another machine with different key layout; ssh-agent holds the key but a stale identity_file is still configured.","solutions":["Fix the `identity_file` path to point at an existing private key file","Remove the `identity_file` setting and rely on ssh-agent/default keys","Generate or restore the missing key at the configured path"],"exampleFix":"// before\nidentity_file = \"~/.ssh/id_rsa_old\"\n// after\nidentity_file = \"~/.ssh/id_ed25519\"","handlingStrategy":"validation","validationCode":"let identity = shellexpand::tilde(&identity_file);\nif !Path::new(identity.as_ref()).is_file() {\n    panic!(\"identity file missing: {}\", identity);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Regenerate or re-point identity_file paths when rotating SSH keys","Prefer ssh-agent over explicit identity_file entries","Expand `~` carefully — verify the expanded path exists on the local machine"],"tags":["remote","ssh","config-validation","key-file"],"backgroundTag":"file-not-found","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}