Skip to content

Support multiple GitHub Enterprise URIs for different extensions #280910

Closed as duplicate

Description

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)

Activity

  1. added
    feature-request
    authentication-github
    and removed on Dec 3, 2025
  2. added this to the Backlog milestone on Dec 3, 2025
  3. lordgreg commented on Feb 20, 2026

    @lordgreg

    this is the issue we are facing at the moment:

    1. copilot should use GHE server 1
    2. github-pull-request should use GHE server 2

    at the moment, it is not possible to do that at all.

  4. Sardiogo commented on Apr 28, 2026

    @Sardiogo

    I’d strongly support this feature.

    This would be a meaningful improvement for enterprise customers. In real company environments, different GitHub related services often need independent configuration, and a single global github-enterprise.uri becomes a deployment constraint. This specific setting change would remove that blocker and make adoption much easier in enterprise setups.

  5. TylerLeonhardt commented on Apr 28, 2026

    @TylerLeonhardt
    Member

    /duplicate #277435

  6. removed
    feature-request
    authentication-github
    on Apr 28, 2026
  7. added
    *duplicate
    on Apr 28, 2026
  8. vs-code-engineering commented on Apr 28, 2026

    @vs-code-engineering
    Contributor

    Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

    Happy Coding!

  9. locked and limited conversation to collaborators on Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicate

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions