git-ecosystem / git-ecosystem/git-credential-manager
Cloning repos via http web proxy (kerberos authentication) is not working with git gui
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9.3k
- Forks
- 2.9k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 14
Description
Version
2.4.1
Operating system
Windows
OS version or distribution
windows server 2022
Git hosting provider(s)
Azure DevOps
Other hosting provider
No response
(Azure DevOps only) What format is your remote URL?
Can you access the remote repository directly in the browser?
Yes, I can access the repository
Expected behavior
Copying repos from outside of internal network to internal network should work via http web proxy.
We are using squid proxy with kerberos authentication so the user should authenticate via proxy using default system credentials. But i cannot seem to get it working via git config.
Also checked proxy logs and there are no information about what domain gets blocked. So i can't bypass the proxy authentication for git credential manager login. (git gui)
Actual behavior
When cloning the repos the authentication error:
fatal: an error occured while sending the request.
fatal: the remote server returned an error: (407) proxy authentication required
I then added the following to users global config:
git config --global credential.helper manager
git config --global http.proxy http://proxy.server.com:proxyport/
git config --global https.proxy http://proxy.server.com:proxyport/
also tried to add the following:
git config --global http.proxyAuthMethod negotiate
git config --global https.proxyAuthMethod negotiate
but did not fix the issue.
After adding the proxy configs the error message changed to:
Fatal unable to access: '[https://dev.azure.com/{org} CONNECT tunnel failed, response 407
Logs
Here is diagnose parts that went success: False
Diagnostic: Networking
Skipped: False
Success: False
Exception:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GitCredentialManager.Diagnostics.NetworkingDiagnostic.<RunInternalAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GitCredentialManager.Diagnostics.Diagnostic.d__6.MoveNext()
Log:
Checking networking and HTTP stack...
Creating HTTP client... OK
IsNetworkAvailable: True
Sending HEAD request to http://example.com...Sending HEAD request to https://example.com... OK
Diagnostic: GitHub API
Skipped: False
Success: False
Exception:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GitHub.GitHubRestApi.<GetMetaInfoAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter1.GetResult()
at GitHub.Diagnostics.GitHubApiDiagnostic.d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at GitCredentialManager.Diagnostics.Diagnostic.d__6.MoveNext()
Log:
Using 'https://github.com/' as API target.
Querying '/meta' endpoint...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NetworkingDiagnostic and GitHubApiDiagnostic entry points and the HttpClientHandler errors shown in the logs, then trace how the global http.proxy, https.proxy, and proxyAuthMethod settings are consumed. Reproduce the 407 response through a Squid Kerberos proxy; done means Git GUI can clone the Azure DevOps repository using the user's system credentials and the diagnostics complete successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, git
- Domain
- authentication, desktop, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100