Skip to content

Extend Logged in with gh to support GHE #166

@andyfeller

Description

@andyfeller

Describe the feature or problem you'd like to solve

As a GHE user, I would like copilot to leverage my ghe.com session from gh like it does when I'm authenticated with my github.com session

Proposed solution

As a GitHub CLI user, I am authenticated with both GitHub.com and GHE accounts. gh determines the appropriate credentials based on various factors:

  1. Local git repository remotes
  2. Command line arguments that capture HOST/OWNER/REPO
  3. GH_HOST env var

The benefit is a uniform streamline experience for both GitHub Copilot CLI and GitHub CLI users.

Example prompts or workflows

No response

Additional context

When I launch copilot authenticated to github.com:

Screenshot of GitHub Copilot CLI showing I am logged in based on GitHub CLI credentials

When I launch copilot authenticated to GHE tenant:

Screenshot of GitHub Copilot CLI showing I am not authenticated when GitHub CLI is logged into GHE

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authenticationLogin, OAuth, device auth, token management, and keychain integrationarea:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settings
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions