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

Improve auto-detection to avoid long web request timeouts #384

Closed
mjcheetham opened this issue Jun 24, 2021 · 2 comments · Fixed by #481
Closed

Improve auto-detection to avoid long web request timeouts #384

mjcheetham opened this issue Jun 24, 2021 · 2 comments · Fixed by #481
Assignees
Labels
auth-issue An issue authenticating to a host enhancement New feature or request performance An issue with performance

Comments

@mjcheetham
Copy link
Collaborator

As mentioned in #364, during the host provider auto-detection when GCM makes a HTTP call to the remote, this can sometimes hang until a long timeout period has elapsed (1 minute?).

We should improve the "2nd level" auto-detection in a few ways:

  1. Add fast-path identification of other host providers from the remote URL hostname
  2. Add more heuristics for common on-prem remote URLs like we do for github.<domain>.<tld> => GHES/AE
  3. Set a short timeout for the HTTP request
  4. Parallelise the HTTP request with other "1st level" detection
  5. Cache the results of the identification request(?)
    a. Prompt the user to remember (set credential.provider) the detected provider(?)
@mjcheetham mjcheetham added enhancement New feature or request auth-issue An issue authenticating to a host labels Jun 24, 2021
@Varriount
Copy link

This is worse than just "long requests" - if one is pushing to a site that doesn't support Microsoft Authentication, and the credential provider isn't set to "generic", the credential manager will eventually be killed by Git, causing Git to fall back to asking for credential input from the user. This essentially makes Git Credential Manager's default configuration broken for any site that isn't GitHub.

@fourofspades
Copy link

This problem is killing us, 2+ seconds for every git request. Was this even tested? The documentation is also poor. How do I specify a server without a hostname, i.e. by ip address, this is unclear.

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 enhancement New feature or request performance An issue with performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants