Skip to content

[BUG] fetch fails with HTTP 400 against Azure DevOps repositories (multi_ack capability) #288

Description

@consooo

When GitOps Reverser targets an Azure DevOps (ADO) git repository, every fetch operation fails with HTTP 400:

TF401041: The Git protocol sent is not as expected (Clients must support multi-ack.).

The root cause is that go-git v5 explicitly blacklists MultiACK and MultiACKDetailed in transport.UnsupportedCapabilities. ADO inspects the client capability
advertisement and rejects any request that does not include multi_ack, before any want/have negotiation occurs. System git works fine with the same PAT and URL
because it does advertise multi_ack.

The root cause was confirmed locally by temporarily removing MultiACK/MultiACKDetailed from transport.UnsupportedCapabilities at startup — fetches succeed after
that change.

To Reproduce

  1. Configure a GitTarget pointing to an Azure DevOps repository.
  2. Create a CommitRequest or trigger a reverse operation.
  3. Observe the fetch step fail with HTTP 400 and the TF401041 error message.

Expected behavior

Fetches against Azure DevOps repositories succeed.

Additional context

This is a known go-git v5 limitation — MultiACK was added to UnsupportedCapabilities intentionally. A proper fix (full stateful multi_ack negotiation) was merged into go-git via PR #1204 (go-git/go-git#1204), targeted for v6.0.0. As of 2026-07-28, go-git v6 is at v6.0.0-alpha.4 and not yet stable.
The likely resolution path is a go-git v6 upgrade once a stable release lands. Until then, since this might be a while, either a fallback should be implemented to system git or a different library used.

Logs

TF401041: The Git protocol sent is not as expected (Clients must support multi-ack.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions