19

I'm getting the following output when executing a fetch / pull via a powershell script:

info: detecting host provider for '[devops site address]'...

Normally, this wouldn't be an issue, however, Azure DevOps sees this output as an error and labels the release stage as such. Is there a way I can either suppress this output, or resolve it via GIT?

The remote location for the repository is an on-prem version of DevOps.

Thanks!

torek
  • 448,244
  • 59
  • 642
  • 775
B.Clark
  • 202
  • 1
  • 2
  • 8
  • 1
    This doesn't come from Git, so it must come from something sitting between Git and the azure devops part. That, or azure devops is confused by its own messages... You'll probably be best served by finding out if there's some sort of man-in-the-middle here that's doing this "host provider" detecting before you proceed. – torek Oct 22 '21 at 21:12
  • 5
    I started getting this too and I don't use Azure DevOps. I just updated to Git for Windows 2.33.1.windows.1. – Albert Szilvasy Oct 23 '21 at 01:33
  • 1
    @torek Sorry, for the late reply. In my limited research, it looks like powershell dumps output to the stderr io stream by default. DevOps is treating this an an error, rightfully so. It also seems like this is likely from GIT. If I run a fetch command through the command line, I'm seeing it. Unfortunately, it doesn't seem like this new output is hidden when running commands quietly. Now I'm in a battle with DevOps trying to reroute the output away from stderr to a file with 2>git_output.file, or 2>&1. Both work when running my powershell locally. Probably something permissions related. – B.Clark Oct 25 '21 at 17:37
  • @AlbertSzilvasy This is the same version I am running. Glad to hear it isn't just me lol. – B.Clark Oct 25 '21 at 17:37
  • 2
    The string doesn't appear anywhere in the Git source, but it might be in some library that Git *uses* (e.g., libcurl). ... Aha, it appears to be in the (Microsoft-provided) Git Credential Manager Core thingy. See [here](https://githubmemory.com/repo/microsoft/Git-Credential-Manager-Core/activity) and [here](https://githubmemory.com/repo/microsoft/Git-Credential-Manager-Core/issues/492). – torek Oct 25 '21 at 17:38

1 Answers1

18

This comes indeed from the GCM used by Git.
You can either downgrade to Git 2.32, or wait for the recently released Git-Credential-Manager-Core v2.0.603, which does remove those messages.

Said release is not yet packaged with the latest Git for Windows, like the recent 2.34.0, but expect it in 2.34.1.

A set GCM_PROVIDER=generic could help too.


Update Nov. 25th, 2021: Git for Windows 2.34.1 has been released, and it does include Git Credential Manager Core v2.0.605.12951.

That GCM 2.0.605 includes "Remove noisy messages during auto-detection" (#492, #494).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250