Skip to content

Commit 30a85cd

Browse files
committed
FAQ about probing
fixes #424
1 parent ff08037 commit 30a85cd

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/autodetect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In order to detect which host provider to use for a self-hosted instance, each
1818
provider can provide some heuristic matching of the hostname. For example any
1919
hostname that begins "github.*" will be matched to the GitHub host provider.
2020

21-
If a heuristic matches incorrectly, you can always [explicitly configure](#explicit-configuration)
21+
If a heuristic matches incorrectly, you can always [explicitly configure](#manual-configuration)
2222
GCM to use a particular provider.
2323

2424
## Remote URL probing

docs/faq.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,18 @@ We are happy to accept proposals and/or contributions to enable GCM to run on ot
8282
Due to the design of Git and credential helpers such as GCM, we need this setting to make Git use the full remote URL (including the path component) when communicating with GCM. The new `dev.azure.com` format of Azure DevOps URLs means the account name is now part of the path component (for example: `https://dev.azure.com/contoso/...`). The Azure DevOps account name is required in order to resolve the correct authority for authentication (which Azure AD tenant backs this account, or if it is backed by Microsoft personal accounts).
8383

8484
In the older GCM for Windows product, the solution to the same problem was a "hack". GCM for Windows would walk the process tree looking for the `git-remote-https.exe` process, and attempt to read/parse the process environment block looking for the command line arguments (that contained the full remote URL). This is fragile and not a cross-platform solution, hense the need for the `credential.useHttpPath` setting with GCM.
85+
86+
### Why does GCM take so long at startup the first time?
87+
88+
GCM will [autodetect](autodetect.md) what kind of Git host it's talking to. GitHub, Bitbucket, and Azure DevOps each have their own form(s) of authentication, plus there's a "generic" username and password option.
89+
90+
For the hosted versions of these services, GCM can guess from the URL which service to use. But for on-premises versions which would have unique URLs, GCM will probe with a network call. GCM caches the results of the probe, so it should be faster on the second and later invocations.
91+
92+
If you know which provider you're talking to and want to avoid the probe, that's possible. You can explicitly tell GCM which provider to use for a URL "example.com" like this:
93+
94+
|| Provider || Command ||
95+
|-----------|----------|
96+
| GitHub | `git config --global credential.https://example.com.provider github`
97+
| Bitbucket | `git config --global credential.https://example.com.provider bitbucket`
98+
| Azure DevOps | `git config --global credential.https://example.com.provider azure-repos`
99+
| Generic | `git config --global credential.https://example.com.provider generic`

0 commit comments

Comments
 (0)