jdx/mise · error
failed to archive remote source with {status}
Error message
failed to archive remote source with {status} What it means
When staging a remote source, mise runs tar (with -C archive_source) to archive the project files locally before streaming them over the session. If that tar process exits non-zero, the source could not be archived and mise bails with the tar exit status.
Source
Thrown at src/system/remote.rs:816
};
let mut command = tokio::process::Command::new(tar);
command.kill_on_drop(true);
command.args(["-czf"]);
command.arg(&archive);
if session.host.copy_links {
command.arg("-h");
}
for exclude in &session.host.exclude {
command.arg(format!("--exclude={exclude}"));
}
let status = command
.args(["-C"])
.arg(archive_source)
.arg(".")
.status()
.await?;
if !status.success() {
bail!("failed to archive remote source with {status}");
}
session
.status_with_stdin_async(&["tar", "-xzf", "-", "-C", project], File::open(archive)?)
.await
}
fn validate_copy_link(source: &Path, link: &Path) -> Result<()> {
validate_copy_link_path(source, link)?;
let path = source.join(link);
fs::metadata(&path)
.wrap_err_with(|| format!("copy_link target does not exist: {}", link.display()))?;
Ok(())
}
fn validate_copy_link_path(source: &Path, link: &Path) -> Result<()> {
if link.as_os_str().is_empty()
|| link.is_absolute()
|| link.components().any(|component| {View on GitHub (pinned to afd2eddd3a)
Solutions
- Check the tar stderr shown above the error for the specific file that failed
- Ensure the SSH account can read all files in the staged source directory
- Free space on the filesystem holding the archive temp directory
- Re-run to rule out transient file changes during archiving
Example fix
// before
bail!("failed to archive remote source with {status}");
// after: capture tar stderr
bail!("failed to archive remote source (tar exit {status}): {stderr}"); Defensive patterns
Strategy: try-catch
Validate before calling
test -r "$file" || echo "unreadable: $file" # pre-check staged files df -h "$(dirname "$archive")" # ensure space for the archive
Try / catch
try { await archiveRemoteSource(); } catch (e) { if (String(e).includes('failed to archive remote source')) { logTarDiag(); } throw e; } Prevention
- Ensure the staging account can read every file in the source tree
- Monitor temp-disk free space before remote staging
- Avoid mutating the source tree concurrently with archiving
When it happens
Trigger: The tar child process archiving the staged source exits non-zero — unreadable files, disk full while writing the archive, or tar not present/behaving unexpectedly on the machine building the archive.
Common situations: Remote staging fails when the project directory contains files the SSH account cannot read, the temp filesystem holding archive_source is full, or permissions changed mid-run.
Related errors
- remote host '{}' source is not a directory: {}
- GitHub relay socket forwarding failed
- rustc output is not a regular file: {}
- failed to create file symlink: {err}
- {other:?}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/77517c6d53382c63.
Report an issue: GitHub.