Skip to content

Support multiple GitHub Enterprise URIs for different extensions #280910

@Changqing-JING

Description

@Changqing-JING

Support multiple GitHub Enterprise URIs for different extensions

Problem

VS Code's github-enterprise authentication provider uses a single global configuration github-enterprise.uri. This creates conflicts when different extensions need to authenticate to different GitHub Enterprise servers.

Real-World Scenario

  • GitHub Pull Requests extension needs to connect to https://github.company.com (company's main github enterprise server as private deployment)
  • GitHub Copilot extension needs to connect to https://xxx.ghe.com (Copilot Enterprise instance at public network)

Currently, both extensions use the same github-enterprise auth provider, so they must share the same URI. There's no way to configure them independently.

Current Limitation

{
  "github-enterprise.uri": "https://github.company.com"
}

Setting this value affects all extensions using github-enterprise authentication. Users cannot:

  • Use Pull Requests with their company GHE while using Copilot Enterprise
  • Connect Copilot to a different GHE instance than Pull Requests
  • Work with any extension-specific GHE configurations

There is no effective workaround.

Proposed Solution

Follow the pattern established by microsoft-authentication extension:

  • Register multiple auth providers with unique IDs
  • Example: github-enterprise-secondary, github-enterprise-copilot
  • Each provider authenticates to its own GHE server
  • Extensions specify which provider they need

Questions for Maintainers

  1. Is this use case worth supporting?
  2. Should configuration be auto-discovered or explicit?
  3. What's the preferred naming scheme for provider IDs?
  4. How should extensions discover the correct provider for their URI?

Benefits

  • Each extension can authenticate to its own GHE server
  • No conflicts between extensions
  • Backward compatible (falls back to github-enterprise.uri if not specified)

Metadata

Metadata

Labels

authentication-githubIssues with the GitHub Authentication extensionfeature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions