nikivdev/code · error

scp failed

Error message

scp failed

What it means

Error "scp failed" thrown in nikivdev/code.

Source

Thrown at src/deploy.rs:1922

    }
    Ok(())
}

/// Copy file via scp.
fn scp_file(local: &Path, conn: &HostConnection, remote: &str) -> Result<()> {
    let dest = format!("{}:{}", conn.ssh_target(), remote);
    let status = Command::new("scp")
        .args([
            "-P",
            &conn.port.to_string(),
            &local.display().to_string(),
            &dest,
        ])
        .status()
        .context("Failed to run scp")?;

    if !status.success() {
        bail!("scp failed");
    }
    Ok(())
}

/// Install the env-fetch script on the host.
/// This script fetches env vars from cloud using a service token on startup.
fn install_env_fetch_script(
    conn: &HostConnection,
    dest: &str,
    service_token: &str,
    api_base: &str,
    project_name: &str,
    environment: &str,
    keys: &[String],
) -> Result<()> {
    // Build the keys query parameter
    let keys_param = if keys.is_empty() {
        String::new()

View on GitHub (pinned to a747e741ae)

When it happens

Trigger: Thrown at src/deploy.rs:1922 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01). Data as JSON: /api/errors/4f4b9d74db946c78. Report an issue: GitHub.