-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add control over use of unsafe remotes #1721
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.
@@ -226,6 +228,7 @@ public static class HelpUrls | |||
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shortlink has been configured to point to
https://github.com/git-ecosystem/git-credential-manager/blob/release/docs/netconfig.md#unsafe-remote-urls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/.
I have opened #1722 to fix this; This successful doc linting run suggests that I've managed 😊 |
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_REMOTES
orcredential.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.