diff --git a/src/shared/GitHub.Tests/GitHubHostProviderTests.cs b/src/shared/GitHub.Tests/GitHubHostProviderTests.cs index 6a8cce07e..132478a88 100644 --- a/src/shared/GitHub.Tests/GitHubHostProviderTests.cs +++ b/src/shared/GitHub.Tests/GitHubHostProviderTests.cs @@ -121,10 +121,10 @@ public async Task GitHubHostProvider_GetSupportedAuthenticationModes(string uriS [Theory] - [InlineData("https://example.com", null, "0.1", false, AuthenticationModes.None)] - [InlineData("https://example.com", null, "0.1", true, AuthenticationModes.Basic)] - [InlineData("https://example.com", null, "100.0", false, AuthenticationModes.OAuth)] - [InlineData("https://example.com", null, "100.0", true, AuthenticationModes.Basic | AuthenticationModes.OAuth)] + [InlineData("https://example.com", null, "0.1", false, AuthenticationModes.Pat)] + [InlineData("https://example.com", null, "0.1", true, AuthenticationModes.Basic | AuthenticationModes.Pat)] + [InlineData("https://example.com", null, "100.0", false, AuthenticationModes.OAuth | AuthenticationModes.Pat)] + [InlineData("https://example.com", null, "100.0", true, AuthenticationModes.All)] public async Task GitHubHostProvider_GetSupportedAuthenticationModes_WithMetadata(string uriString, string gitHubAuthModes, string installedVersion, bool verifiablePasswordAuthentication, AuthenticationModes expectedModes) { diff --git a/src/shared/GitHub/GitHubHostProvider.cs b/src/shared/GitHub/GitHubHostProvider.cs index a85f6ba40..93196fe10 100644 --- a/src/shared/GitHub/GitHubHostProvider.cs +++ b/src/shared/GitHub/GitHubHostProvider.cs @@ -243,7 +243,7 @@ internal async Task GetSupportedAuthenticationModesAsync(Ur { GitHubMetaInfo metaInfo = await _gitHubApi.GetMetaInfoAsync(targetUri); - var modes = AuthenticationModes.None; + var modes = AuthenticationModes.Pat; if (metaInfo.VerifiablePasswordAuthentication) { modes |= AuthenticationModes.Basic;