Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-credential-manager not using oauth #1821

Open
thesantatitan opened this issue Feb 4, 2025 · 1 comment
Open

git-credential-manager not using oauth #1821

thesantatitan opened this issue Feb 4, 2025 · 1 comment
Labels
auth-issue An issue authenticating to a host

Comments

@thesantatitan
Copy link

Version

2.1.2

Operating system

Windows

OS version or distribution

Windows 11

Git hosting provider(s)

Azure DevOps

Other hosting provider

No response

(Azure DevOps only) What format is your remote URL?

https://{org}@dev.azure.com/{org}

Can you access the remote repository directly in the browser?

Yes, I can access the repository

Expected behavior

When I do git clone, it should either use my Windows account, or open up an OAuth window.

Actual behavior

I am getting a password and username prompt

Image

Logs

PS C:\Users\devrajput> git clone https://[email protected]/msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:51.632916 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
20:48:51.642880 git.c:462 trace: built-in: git clone https://[email protected]/msazure/msk8s/_git/aks-hybrid-cloud-cp
Cloning into 'aks-hybrid-cloud-cp'...
20:48:51.666777 run-command.c:661 trace: run_command: git remote-https origin https://[email protected]/msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:51.682858 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:51.682858 git.c:748 trace: exec: git-remote-https origin https://[email protected]/msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:51.682858 run-command.c:661 trace: run_command: git-remote-https origin https://[email protected]/msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:51.698968 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.551729 run-command.c:661 trace: run_command: 'git credential-manager get'
20:48:56.613749 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.613749 git.c:748 trace: exec: git-credential-manager get
20:48:56.613749 run-command.c:661 trace: run_command: git-credential-manager get
20:48:56.703616 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.705231 git.c:462 trace: built-in: git config --null --list
20:48:56.727862 ...\Application.cs:95 trace: [RunInternalAsync] Version: 2.1.2.0
20:48:56.727862 ...\Application.cs:96 trace: [RunInternalAsync] Runtime: .NET Framework 4.0.30319.42000
20:48:56.727862 ...\Application.cs:97 trace: [RunInternalAsync] Platform: Windows (x86-64)
20:48:56.727862 ...\Application.cs:98 trace: [RunInternalAsync] OSVersion: 10.0 (build 26100)
20:48:56.727862 ...\Application.cs:99 trace: [RunInternalAsync] AppPath: C:\Program Files\Git\mingw64\bin\git-credential-manager.exe
20:48:56.727862 ...\Application.cs:100 trace: [RunInternalAsync] InstallDir: C:\Program Files\Git\mingw64\bin
20:48:56.727862 ...\Application.cs:101 trace: [RunInternalAsync] Arguments: get
20:48:56.772851 ...GitCommandBase.cs:33 trace: [ExecuteAsync] Start 'get' command...
20:48:56.780700 ...GitCommandBase.cs:47 trace: [ExecuteAsync] Detecting host provider for input:
20:48:56.780700 ...GitCommandBase.cs:48 trace: [ExecuteAsync] protocol=https
20:48:56.786089 ...GitCommandBase.cs:48 trace: [ExecuteAsync] host=dev.azure.com
20:48:56.786089 ...GitCommandBase.cs:48 trace: [ExecuteAsync] path=msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:56.786089 ...GitCommandBase.cs:48 trace: [ExecuteAsync] username=msazure
20:48:56.786089 ...GitCommandBase.cs:48 trace: [ExecuteAsync] wwwauth[]=Basic realm="https://tfsprodwus24.visualstudio.com/"
20:48:56.788555 ...oviderRegistry.cs:99 trace: [GetProviderAsync] Host provider override was set id='generic'
20:48:56.789959 ...GitCommandBase.cs:50 trace: [ExecuteAsync] Host provider 'Generic' was selected.
20:48:56.789959 ...\HostProvider.cs:126 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp account=msazure...
20:48:56.789959 ...\HostProvider.cs:131 trace: [GetCredentialAsync] No existing credentials found.
20:48:56.789959 ...\HostProvider.cs:134 trace: [GetCredentialAsync] Creating new credential...
20:48:56.789959 ...ricOAuthConfig.cs:19 trace: [TryGet] Invalid OAuth configuration - missing/invalid authorize endpoint:
20:48:56.789959 ...icHostProvider.cs:86 trace: [GenerateCredentialAsync] Checking host 'https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp' for Windows Integrated Authentication...
20:48:56.804223 ...Authentication.cs:34 trace: [GetIsSupportedAsync] HTTP: HEAD https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp
20:48:56.804223 ...pClientFactory.cs:60 trace: [CreateClient] Creating new HTTP client instance...
20:48:56.832469 ...pClientFactory.cs:80 trace: [CreateClient] Git's SSL/TLS backend is: OpenSsl
20:48:56.846725 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.846725 git.c:462 trace: built-in: git version
20:48:56.867023 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.867023 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.sslCAInfo
20:48:56.882701 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.882701 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.sslCAInfo
20:48:56.903980 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.905988 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s/_git.sslCAInfo
20:48:56.921879 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.921879 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s/_git.sslCAInfo
20:48:56.938999 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.941010 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s.sslCAInfo
20:48:56.956034 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.956034 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s.sslCAInfo
20:48:56.970615 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.970615 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure.sslCAInfo
20:48:56.989281 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.989281 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure.sslCAInfo
20:48:56.993532 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:56.993532 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com.sslCAInfo
20:48:57.022145 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.024155 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com.sslCAInfo
20:48:57.039440 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.039440 git.c:462 trace: built-in: git config --null --type=path http.https://azure.com.sslCAInfo
20:48:57.055506 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.057258 git.c:462 trace: built-in: git config --null --type=path http.azure.com.sslCAInfo
20:48:57.057258 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.073196 git.c:462 trace: built-in: git config --null --type=path http.sslCAInfo
20:48:57.078645 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.088865 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.sslCAInfo
20:48:57.127395 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.127395 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.sslCAInfo
20:48:57.147030 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.147030 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s/_git.sslCAInfo
20:48:57.163404 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.163404 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s/_git.sslCAInfo
20:48:57.178622 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.178622 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure/msk8s.sslCAInfo
20:48:57.189497 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.201222 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure/msk8s.sslCAInfo
20:48:57.216931 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.216931 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com/msazure.sslCAInfo
20:48:57.234589 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.234589 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com/msazure.sslCAInfo
20:48:57.248814 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.248814 git.c:462 trace: built-in: git config --null --type=path http.https://dev.azure.com.sslCAInfo
20:48:57.264681 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.264681 git.c:462 trace: built-in: git config --null --type=path http.dev.azure.com.sslCAInfo
20:48:57.281300 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.281300 git.c:462 trace: built-in: git config --null --type=path http.https://azure.com.sslCAInfo
20:48:57.300020 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.300020 git.c:462 trace: built-in: git config --null --type=path http.azure.com.sslCAInfo
20:48:57.312563 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:57.312563 git.c:462 trace: built-in: git config --null --type=path http.sslCAInfo
20:48:57.312563 ...ClientFactory.cs:113 trace: [CreateClient] Custom certificate verification has been enabled with certificate bundle at C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt
20:48:58.522474 ...Authentication.cs:37 trace: [GetIsSupportedAsync] HTTP: Response code ignored.
20:48:58.522474 ...Authentication.cs:39 trace: [GetIsSupportedAsync] Inspecting WWW-Authenticate headers...
20:48:58.522474 ...icHostProvider.cs:91 trace: [GenerateCredentialAsync] Host does not support WIA.
20:48:58.523686 ...cHostProvider.cs:113 trace: [GenerateCredentialAsync] Prompting for basic credentials...
20:48:58.541310 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.541310 git.c:462 trace: built-in: git config --null --type=path credential.https://dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.uiHelper
20:48:58.557808 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.557808 git.c:462 trace: built-in: git config --null --type=path credential.dev.azure.com/msazure/msk8s/_git/aks-hybrid-cloud-cp.uiHelper
20:48:58.572974 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.572974 git.c:462 trace: built-in: git config --null --type=path credential.https://dev.azure.com/msazure/msk8s/_git.uiHelper
20:48:58.589852 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.589852 git.c:462 trace: built-in: git config --null --type=path credential.dev.azure.com/msazure/msk8s/_git.uiHelper
20:48:58.615290 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.617303 git.c:462 trace: built-in: git config --null --type=path credential.https://dev.azure.com/msazure/msk8s.uiHelper
20:48:58.635482 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.637006 git.c:462 trace: built-in: git config --null --type=path credential.dev.azure.com/msazure/msk8s.uiHelper
20:48:58.652868 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.652868 git.c:462 trace: built-in: git config --null --type=path credential.https://dev.azure.com/msazure.uiHelper
20:48:58.668969 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.668969 git.c:462 trace: built-in: git config --null --type=path credential.dev.azure.com/msazure.uiHelper
20:48:58.688053 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.688053 git.c:462 trace: built-in: git config --null --type=path credential.https://dev.azure.com.uiHelper
20:48:58.706780 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.706780 git.c:462 trace: built-in: git config --null --type=path credential.dev.azure.com.uiHelper
20:48:58.716698 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.716698 git.c:462 trace: built-in: git config --null --type=path credential.https://azure.com.uiHelper
20:48:58.732420 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.732420 git.c:462 trace: built-in: git config --null --type=path credential.azure.com.uiHelper
20:48:58.750337 exec-cmd.c:243 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
20:48:58.750337 git.c:462 trace: built-in: git config --null --type=path credential.uiHelper

@thesantatitan thesantatitan added the auth-issue An issue authenticating to a host label Feb 4, 2025
@becm
Copy link

becm commented Feb 6, 2025

According to your log, the HostProvider is locked to the Generic implementation.
This provider would need additional config setting but should not be used on dev.azure.com repos anway.

There is a dedicated Provider to work with Azure repositories.
You can check for explicit provider settings to avoid (or enforce) the override.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-issue An issue authenticating to a host
Projects
None yet
Development

No branches or pull requests

2 participants