gitbutlerapp/gitbutler · error · anyhow::Error

`but land` does not yet support triangular remotes (fetch `{

Error message

`but land` does not yet support triangular remotes (fetch `{fetch_remote_name}`, push `{push_remote_name}`). Land via a pull request instead, or configure a single remote for the target branch.

What it means

Error "`but land` does not yet support triangular remotes (fetch `{fetch_remote_name}`, push `{push_remote_name}`). Land via a pull request instead, or configure a single remote for the target branch." thrown in gitbutlerapp/gitbutler.

Source

Thrown at crates/but-api/src/land/mod.rs:213

    let target_branch_name = base_branch.short_name.clone();
    if target_branch_name.is_empty() {
        bail!("Configured target branch has no branch name");
    }
    let fetch_remote_name = base_branch.remote_name.clone();
    let push_remote_name = if base_branch.push_remote_name.is_empty() {
        fetch_remote_name.clone()
    } else {
        base_branch.push_remote_name.clone()
    };
    if push_remote_name.is_empty() {
        bail!("Configured target branch has no push remote");
    }

    // Triangular remotes (fetch remote != push remote) are out of scope for now: the post-land
    // reconcile reads the fetch remote's tracking ref, so a push to a different remote would not
    // advance it and the reconcile would silently no-op. Refuse before mutating anything.
    if push_remote_name != fetch_remote_name {
        bail!(
            "`but land` does not yet support triangular remotes (fetch `{fetch_remote_name}`, \
             push `{push_remote_name}`). Land via a pull request instead, or configure a single \
             remote for the target branch."
        );
    }

    let target_display = format!("{push_remote_name}/{target_branch_name}");
    let push_remote_url = if base_branch.push_remote_url.is_empty() {
        &base_branch.remote_url
    } else {
        &base_branch.push_remote_url
    };
    let update_target_locally = {
        let repo = ctx.repo.get()?;
        remote_points_at_current_repo(&repo, push_remote_url)?
    };

    // Safety guards a non-CLI caller must not be able to bypass: never publish lower stack segments

View on GitHub (pinned to caf1f223d3)

When it happens

Trigger: Thrown at crates/but-api/src/land/mod.rs:213 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/4a97aa9f6c772f8b. Report an issue: GitHub.