From 74f0eaf892562e669bf8472695b0f2060e8ec667 Mon Sep 17 00:00:00 2001 From: Marlon Regenhardt Date: Thu, 22 Aug 2024 18:25:03 +0200 Subject: [PATCH] Remove misleading error message GitLab is used for internal hosting, which may often use unencrpted http. This error message is misleading, as the process continues and works regardless, and also falsely mentions Github instead of GitLab. --- src/shared/GitLab/GitLabHostProvider.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/shared/GitLab/GitLabHostProvider.cs b/src/shared/GitLab/GitLabHostProvider.cs index eda6e2f0f..545e87a69 100644 --- a/src/shared/GitLab/GitLabHostProvider.cs +++ b/src/shared/GitLab/GitLabHostProvider.cs @@ -41,9 +41,6 @@ public override bool IsSupported(InputArguments input) return false; } - // We do not support unencrypted HTTP communications to GitLab, - // but we report `true` here for HTTP so that we can show a helpful - // error message for the user in `CreateCredentialAsync`. if (!StringComparer.OrdinalIgnoreCase.Equals(input.Protocol, "http") && !StringComparer.OrdinalIgnoreCase.Equals(input.Protocol, "https")) { @@ -94,13 +91,6 @@ public override async Task GenerateCredentialAsync(InputArguments i { ThrowIfDisposed(); - // We should not allow unencrypted communication and should inform the user - if (StringComparer.OrdinalIgnoreCase.Equals(input.Protocol, "http")) - { - throw new Trace2Exception(Context.Trace2, - "Unencrypted HTTP is not supported for GitHub. Ensure the repository remote URL is using HTTPS."); - } - Uri remoteUri = input.GetRemoteUri(); AuthenticationModes authModes = GetSupportedAuthenticationModes(remoteUri);