Add control over use of unsafe remotes#1721
Merged
mjcheetham merged 6 commits intogit-ecosystem:mainfrom Oct 7, 2024
Merged
Conversation
Add a new setting that allows users to express an explicit consent to using unsafe remote URLs (such as those using HTTP rather than HTTPS).
Note that we only emit a warning for the generic host provider rather than failing-fast like the other providers do. This is because we never blocked HTTP remotes previously in the generic provider (which is often used for localhost, custom hosts, etc) and don't want to break any existing scenarios or scripts. The new option can be used to dismiss this warning message.
mjcheetham
commented
Oct 7, 2024
| public const string GcmAutoDetect = "https://aka.ms/gcm/autodetect"; | ||
| public const string GcmDefaultAccount = "https://aka.ms/gcm/defaultaccount"; | ||
| public const string GcmMultipleUsers = "https://aka.ms/gcm/multipleusers"; | ||
| public const string GcmUnsafeRemotes = "https://aka.ms/gcm/unsaferemotes"; |
Contributor
Author
There was a problem hiding this comment.
This shortlink has been configured to point to
https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/netconfig.md#unsafe-remote-urls
dscho
approved these changes
Oct 7, 2024
Contributor
dscho
left a comment
There was a problem hiding this comment.
This PR looks good to me!
There is a new error about a broken link:
✗ [404] https://specifications.freedesktop.org/secret-service/ | Failed: Network error: Not Found
This link is in GCM's documentation apparently 3 times. I think that this should be updated to https://specifications.freedesktop.org/secret-service-spec/.
Contributor
I have opened #1722 to fix this; This successful doc linting run suggests that I've managed 😊 |
Merged
mjcheetham
added a commit
that referenced
this pull request
Jan 14, 2026
**Changes:** - Documentation updates & fixes - #1713 - #1722 - #1884 - #2123 - #2154 - Fix Generic provider refresh token refresh logic (#1838) - Version bump to 2.7.0 (#2177) - CODEOWNERS (#2053) - Allow unsafe remotes via config (#1721) - Drop no longer needed GitLab OAuth params (#1538) - No-op credential storage option (#1740) - Fixes to CI & build - #1746 - #1747 - #1752 - #2104 - #2217 - Use Azure Pipelines for official builds - #2054 - #2176 - Fix TRACE2 logging (#1909) - Linux ARM and ARM64 support - #1633 - #2232 - Windows ARM64 and x64 support (#2230) - Linux install-from-source bug fixes - #1757 - #2049 - #2052 - Support Oracle Linux vis install-from-source (#2212) - macOS enterprise defaults (#1811) - Actions dependency updates - #1725 - #1751 - #1750 - #1760 - #1799 - #2022 - #2048 - #1989 - #2011 - #2029 - #2051 - #2050 - #2070 - #2080 - #2089 - #2088 - #2092 - #2189 - #2193
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today, all the custom host providers (Azure Repos, Bitbucket, GitHub, GitLab) block the use of HTTP (unencrypted) remote URLs and error out. Only the generic host provider permits HTTP remotes.
From #1694, we learn that a common use case for self/corporate hosted Git servers is to use HTTP remotes. Even if this is not recommended, GCM should not outright block these.
Instead, we now add an option,
GCM_ALLOW_UNSAFE_REMOTESorcredential.allowUnsafeRemotes, for the user to explicitly set to allow the use of these unsafe remotes.For the generic host provider we only print a warning when using HTTP remotes to reduce the churn for existing users who rely on GCM for HTTP remotes.