jdx/mise · error

failed to archive remote source with

Error message

failed to archive remote source with {status}

What it means

Before uploading the project to a remote host, mise creates a local gzip tarball of the source directory with `tar -czf`. This error means that local tar process exited with a non-zero status, so the archive may be incomplete or missing and the upload cannot proceed. The status of the failed process is included in the message.

Solutions

  1. Re-run the command once the source tree is quiet (stop concurrent builds/writers)
  2. Fix permissions or add the unreadable paths to the exclude list (`--exclude=` options from mise ssh config)
  3. Check free disk space where the temp archive is written
  4. Verify the `tar` binary resolves to GNU/BSD tar (`which tar`, `tar --version`)

Example fix

# before: source dir contains a live build output that churns during tarring
mise ssh host -- source/
# after: exclude volatile paths
mise ssh --exclude target --exclude node_modules host -- source/
Defensive patterns

Strategy: validation

Validate before calling

# before invoking remote provisioning
tar -czf /tmp/preflight.tar.gz -C "$SOURCE_DIR" . || { echo "source not archivable: $?"; exit 1; }

Prevention

When it happens

Trigger: Calling upload_source (via staged `mise ssh`); the local `tar -czf archive -C archive_source .` command exits non-zero, e.g. because files became unreadable mid-read or tar could not write the archive.

Common situations: Source tree contains files that disappeared or changed permission during archiving (racing builds); the temp directory filling the disk; a local `tar` that is actually a broken shim/aliased binary; unreadable files under the source directory.

Related errors


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

Appendix: source

Thrown at src/system/remote.rs:818

    };
    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 533346cc37)