jdx/mise · error
remote upload to ' ' failed with
Error message
remote upload to '{}' failed with {status} What it means
`upload_file`/related upload path in src/system/remote.rs streams a local file to the remote host over SSH (e.g. `ssh host dd/cat`) and bails if the spawned process exits non-success, embedding the exit `status` in the message. The upload command itself ran but the remote side (or local ssh client) failed.
Solutions
- Verify SSH connectivity manually first: `ssh <host> true` — fix auth (ssh-agent, keys) if it fails
- Check remote disk space and write permission for the staging path (`df -h`, `ls -ld /tmp` on the host)
- Re-run the operation; for transient network drops, ensure ControlMaster/connection reuse or retry after restoring connectivity
Example fix
// before $ mise remote-upload ssh://deploy@host Error: remote upload to 'deploy@host' failed with exit status: 255 // after $ ssh-add ~/.ssh/deploy_key # load missing key $ ssh deploy@host true # verify auth works $ mise remote-upload ssh://deploy@host # succeeds
Defensive patterns
Strategy: try-catch
Validate before calling
# before uploading, verify ssh works
ssh -o BatchMode=yes -o ConnectTimeout=5 "$host" true \\\n || { echo "ssh to $host unavailable"; exit 1; }
# and remote /tmp is writable
ssh "$host" 'test -w /tmp' || { echo "remote /tmp not writable"; exit 1; } Try / catch
match upload_result {
Err(e) if e.to_string().contains("remote upload") => {
eprintln!("upload failed: {e}; check ssh auth and remote disk space");
// optionally retry once after `ssh-add` / connectivity check
}
Err(e) => return Err(e),
Ok(()) => {}
} Prevention
- Preload SSH keys into ssh-agent and test `ssh host true` first
- Monitor remote disk space on staging hosts
- Use SSH ControlMaster for connection reuse and resilience
When it happens
Trigger: `ssh`/`scp`-style upload invoked with a non-zero exit: ssh authentication failure, remote shell refusing the command, remote disk full, connection dropped mid-transfer, or the remote command not permitted.
Common situations: SSH key not loaded in the agent; remote ~/.ssh/authorized_keys misconfigured; read-only or full remote filesystem at the staging path; network interruption during a large binary upload.
Related errors
- remote cleanup failed with
- remote command on ' ' failed with
- 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/2a140579b02f503f.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/remote.rs:2074
let output = tokio::process::Command::new(&self.ssh)
.args(args)
.kill_on_drop(true)
.output()
.await?;
checked_output(output, &self.host.name)
}
async fn status_with_stdin_async(&self, remote_argv: &[&str], input: File) -> Result<()> {
let args = self.args(false, remote_argv);
info!("$ {} {}", self.ssh.display(), shell_words::join(&args));
let status = tokio::process::Command::new(&self.ssh)
.args(args)
.stdin(Stdio::from(input))
.kill_on_drop(true)
.status()
.await?;
if !status.success() {
bail!("remote upload to '{}' failed with {status}", self.host.name);
}
Ok(())
}
async fn upload_executable(&self, local: &Path, remote: &str) -> Result<()> {
let file = File::open(local)
.wrap_err_with(|| format!("failed to open mise binary {}", local.display()))?;
self.status_with_stdin_async(
&[
"sh",
"-c",
&format!(
"cat > {} && chmod 700 {}",
shell_quote(remote),
shell_quote(remote)
),
],
file,View on GitHub (pinned to 533346cc37)