{"record":{"id":"77517c6d53382c63","repo":"jdx/mise","slug":"failed-to-archive-remote-source-with-status","errorCode":null,"errorMessage":"failed to archive remote source with {status}","messagePattern":"failed to archive remote source with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":818,"sourceCode":"    };\n    let mut command = tokio::process::Command::new(tar);\n    command.kill_on_drop(true);\n    command.args([\"-czf\"]);\n    command.arg(&archive);\n    if session.host.copy_links {\n        command.arg(\"-h\");\n    }\n    for exclude in &session.host.exclude {\n        command.arg(format!(\"--exclude={exclude}\"));\n    }\n    let status = command\n        .args([\"-C\"])\n        .arg(archive_source)\n        .arg(\".\")\n        .status()\n        .await?;\n    if !status.success() {\n        bail!(\"failed to archive remote source with {status}\");\n    }\n    session\n        .status_with_stdin_async(&[\"tar\", \"-xzf\", \"-\", \"-C\", project], File::open(archive)?)\n        .await\n}\n\nfn validate_copy_link(source: &Path, link: &Path) -> Result<()> {\n    validate_copy_link_path(source, link)?;\n    let path = source.join(link);\n    fs::metadata(&path)\n        .wrap_err_with(|| format!(\"copy_link target does not exist: {}\", link.display()))?;\n    Ok(())\n}\n\nfn validate_copy_link_path(source: &Path, link: &Path) -> Result<()> {\n    if link.as_os_str().is_empty()\n        || link.is_absolute()\n        || link.components().any(|component| {","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L800-L836","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-run the command once the source tree is quiet (stop concurrent builds/writers)","Fix permissions or add the unreadable paths to the exclude list (`--exclude=` options from mise ssh config)","Check free disk space where the temp archive is written","Verify the `tar` binary resolves to GNU/BSD tar (`which tar`, `tar --version`)"],"exampleFix":"# before: source dir contains a live build output that churns during tarring\nmise ssh host -- source/\n# after: exclude volatile paths\nmise ssh --exclude target --exclude node_modules host -- source/","handlingStrategy":"validation","validationCode":"# before invoking remote provisioning\ntar -czf /tmp/preflight.tar.gz -C \"$SOURCE_DIR\" . || { echo \"source not archivable: $?\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Exclude volatile build output (target/, node_modules/, dist/) from the source","Ensure all source files are readable by the invoking user","Keep enough free disk space for the temporary archive","Avoid modifying the source tree while provisioning is running"],"tags":["tar","archive","filesystem"],"backgroundTag":"command-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}