Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/authentication/githubServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { HostHelper } from './configuration';
export class GitHubManager {
private static readonly _githubDotComServers = new Set<string>().add('github.com').add('ssh.github.com');
private static readonly _gheServers = new Set<string>().add('ghe.com');
private static readonly _neverGitHubServers = new Set<string>().add('bitbucket.org').add('gitlab.com');
private static readonly _neverGitHubServers = new Set<string>().add('bitbucket.org').add('gitlab.com').add('codeberg.org');
private _knownServers: Map<string, GitHubServerType> = new Map([...Array.from(GitHubManager._githubDotComServers.keys()).map(key => [key, GitHubServerType.GitHubDotCom]), ...Array.from(GitHubManager._gheServers.keys()).map(key => [key, GitHubServerType.Enterprise])] as [string, GitHubServerType][]);

public static isGithubDotCom(host: string): boolean {
Expand Down
2 changes: 1 addition & 1 deletion src/github/folderRepositoryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export class FolderRepositoryManager extends Disposable {
// good
} else if ((enterpriseCount > 0) && this._credentialStore.isAuthenticated(AuthProvider.githubEnterprise)) {
// also good
} else if (isAuthenticated) {
} else if (isAuthenticated && ((dotComCount > 0) || (enterpriseCount > 0))) {
// Not good. We have a mismatch between auth type and server type.
isAuthenticated = false;
}
Expand Down