Is your feature request related to a problem? Please describe.
The plugin authentication is hardcoded to use https://github.com/login/device, which makes it impossible to use with GitHub Enterprise Cloud (GHE.com) accounts (e.g. company.ghe.com). Users whose Copilot license is exclusively tied to a GHE.com managed account cannot authenticate at all, even if the gh CLI is already authenticated against the enterprise host with the copilot scope.
Describe the solution you'd like
Add a setting in the plugin configuration to specify a custom GitHub Enterprise hostname (e.g. mycompany.ghe.com). When set, the device flow and all authentication requests should point to that host instead of github.com. This is consistent with how other Copilot integrations handle GHE.com — for example VS Code supports this via the github-enterprise: uri setting.
Alternatively, the plugin could detect an existing gh CLI token scoped to a GHE host and use that directly, skipping the device flow entirely.
Describe alternatives you've considered
- Using a Personal Access Token from the GHE instance — the plugin does not appear to support PAT-based auth
- Pre-authenticating via
gh auth login --hostname mycompany.ghe.com --scopes copilot — the token is correctly stored but the plugin ignores it and still initiates a new device flow against github.com
- Creating an OAuth App on the GHE instance — the plugin has no field to provide a custom Client ID
Additional context
GitHub Enterprise Cloud with data residency (*.ghe.com) is increasingly common in large enterprises. The gh CLI already supports multi-host authentication, so the token infrastructure is in place — the plugin just needs to respect it or expose a hostname setting.
Is your feature request related to a problem? Please describe.
The plugin authentication is hardcoded to use
https://github.com/login/device, which makes it impossible to use with GitHub Enterprise Cloud (GHE.com) accounts (e.g.company.ghe.com). Users whose Copilot license is exclusively tied to a GHE.com managed account cannot authenticate at all, even if theghCLI is already authenticated against the enterprise host with thecopilotscope.Describe the solution you'd like
Add a setting in the plugin configuration to specify a custom GitHub Enterprise hostname (e.g.
mycompany.ghe.com). When set, the device flow and all authentication requests should point to that host instead ofgithub.com. This is consistent with how other Copilot integrations handle GHE.com — for example VS Code supports this via thegithub-enterprise: urisetting.Alternatively, the plugin could detect an existing
ghCLI token scoped to a GHE host and use that directly, skipping the device flow entirely.Describe alternatives you've considered
gh auth login --hostname mycompany.ghe.com --scopes copilot— the token is correctly stored but the plugin ignores it and still initiates a new device flow againstgithub.comAdditional context
GitHub Enterprise Cloud with data residency (
*.ghe.com) is increasingly common in large enterprises. TheghCLI already supports multi-host authentication, so the token infrastructure is in place — the plugin just needs to respect it or expose a hostname setting.