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

  1. Check the tar stderr shown above the error for the specific file that failed
  2. Ensure the SSH account can read all files in the staged source directory
  3. Free space on the filesystem holding the archive temp directory
  4. 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

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


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/77517c6d53382c63. Report an issue: GitHub.