Skip to content

[Bug] Git CLI HTTP errors misclassified when URLs or paths contain status-code digits #5365

Closed

Description

@arturcic

Created by Codex on behalf of @arturcic.

GitCliMutator.ThrowOnFailure searches all of Git's stderr for the substrings 401, 403 and 404. Those digits can occur in URLs, localhost ports or filesystem paths, causing unrelated failures to be reported as HTTP authentication, permission or repository-not-found errors.

For example, a local HTTP server returning 404 at http://127.0.0.1:40123/missing/repo.git causes Git to report:

fatal: repository 'http://127.0.0.1:40123/missing/repo.git/' not found

GitVersion incorrectly maps this to Unauthorized: Incorrect username/password; a port containing 403 produces the forbidden message. The expected result is Not found: The repository was not found. URL/path digits can also override a genuine HTTP diagnostic, or replace an unrelated connection failure.

This was observed as an intermittent failure of CloneOfMissingHttpRepositoryMapsGitsNotFoundPhrasing in #5207 (failed job). The classifier and test are also present unchanged on main, so the problem is independent of .NET 11 support.

HTTP classification should recognize Git's explicit status diagnostic, preserve existing authentication/not-found phrases, and leave unrelated failures intact. Deterministic regression tests with controlled Git stderr reproduce ten failing cases before the fix.

Activity

  1. added this to the 7.0.0 milestone on Nov 15, 2026
  2. github-actions commented on Nov 17, 2026

    @github-actions

    🎉 This issue has been resolved in version 7.0.0 🎉
    The release is available on:

    Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions