File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,13 @@ public override async Task<ICredential> GenerateCredentialAsync(InputArguments i
9595 ThrowIfDisposed ( ) ;
9696
9797 // We should not allow unencrypted communication and should inform the user
98- if ( StringComparer . OrdinalIgnoreCase . Equals ( input . Protocol , "http" ) )
98+ if ( ! Context . Settings . AllowUnsafeRemotes &&
99+ StringComparer . OrdinalIgnoreCase . Equals ( input . Protocol , "http" ) )
99100 {
100101 throw new Trace2Exception ( Context . Trace2 ,
101- "Unencrypted HTTP is not supported for GitHub. Ensure the repository remote URL is using HTTPS." ) ;
102+ "Unencrypted HTTP is not recommended for GitLab. " +
103+ "Ensure the repository remote URL is using HTTPS " +
104+ $ "or see { Constants . HelpUrls . GcmUnsafeRemotes } about how to allow unsafe remotes.") ;
102105 }
103106
104107 Uri remoteUri = input . GetRemoteUri ( ) ;
You can’t perform that action at this time.
0 commit comments