enhancement: support ghe.com copilot auth #253

Closed
opened 2026-02-16 17:25:56 -05:00 by yindo · 7 comments
Owner

Originally created by @dotned on GitHub (Jun 24, 2025).

Originally assigned to: @thdxr on GitHub.

I saw the X post and the PR in respect to bringing GitHub Copilot to the providers list, great stuff. I note it doesn't cover ghe.com and wondered if that was something being considered?

Originally created by @dotned on GitHub (Jun 24, 2025). Originally assigned to: @thdxr on GitHub. I saw the X post and the PR in respect to bringing GitHub Copilot to the providers list, great stuff. I note it doesn't cover ghe.com and wondered if that was something being considered?
yindo closed this issue 2026-02-16 17:25:56 -05:00
Author
Owner

@thdxr commented on GitHub (Jun 24, 2025):

open to supporting it - just not sure what's involved. does copilot even work with GHE?

@thdxr commented on GitHub (Jun 24, 2025): open to supporting it - just not sure what's involved. does copilot even work with GHE?
Author
Owner

@dotned commented on GitHub (Jun 25, 2025):

Yes, we use ghe.com, GitHub Enterprise with Data Residency, and have CoPilot enabled. It's the same as the normal github.com setup with one small but significant difference. The url is customer specific. e.g. https://company.ghe.com

This means the URLs look like...

https://company.ghe.com/login/device/code
https://company.ghe.com/login/oauth/access_token
https://company.ways.ghe.com/copilot_internal/v2/token

I tried to see if I could authenticate without changing anything but these URLs in code and it worked. The issue will be in asking the user for thier "company" name as that is the dynamic element.

IDEs allow this connection a few ways but essentially asking for the Enterprise URL, https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom

@dotned commented on GitHub (Jun 25, 2025): Yes, we use ghe.com, GitHub Enterprise with Data Residency, and have CoPilot enabled. It's the same as the normal github.com setup with one small but significant difference. The url is customer specific. e.g. https://company.ghe.com This means the URLs look like... https://company.ghe.com/login/device/code https://company.ghe.com/login/oauth/access_token https://company.ways.ghe.com/copilot_internal/v2/token I tried to see if I could authenticate without changing anything but these URLs in code and it worked. The issue will be in asking the user for thier "company" name as that is the dynamic element. IDEs allow this connection a few ways but essentially asking for the Enterprise URL, https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom
Author
Owner

@vegardx commented on GitHub (Jul 7, 2025):

It would be amazing if this functionality was added. As already mentioned, just giving the user ability to set the URL to GitHub, eg. GITHUB_HOST to whatever they have. You can also get this context out

It's worth mentioning that what @dotned is talking about is GitHub Enterprise Cloud, not GitHub Enterprise Server. There's a lot of confusion around naming for the different products in GitHub. To the best of my knowledge these are sort of the products that exists:

  • GitHub Enterprise Cloud: GitHub Enterprise on GitHub.com, often using the abbreviation GHEC
  • GitHub Enterprise Cloud with Data Residency: GitHub Enterprise on GHE.com, often using the abbreviation GHECDR
  • GitHub Enterprise Server: Self-hosted GitHub Enterprise, often abbreviated as GHES
@vegardx commented on GitHub (Jul 7, 2025): It would be amazing if this functionality was added. As already mentioned, just giving the user ability to set the URL to GitHub, eg. `GITHUB_HOST` to whatever they have. You can also get this context out It's worth mentioning that what @dotned is talking about is GitHub Enterprise Cloud, not GitHub Enterprise Server. There's a lot of confusion around naming for the different products in GitHub. To the best of my knowledge these are sort of the products that exists: - `GitHub Enterprise Cloud`: GitHub Enterprise on GitHub.com, often using the abbreviation `GHEC` - `GitHub Enterprise Cloud with Data Residency`: GitHub Enterprise on GHE.com, often using the abbreviation `GHECDR` - `GitHub Enterprise Server`: Self-hosted GitHub Enterprise, often abbreviated as `GHES`
Author
Owner

@FortinFred commented on GitHub (Jul 20, 2025):

Yes, we use ghe.com, GitHub Enterprise with Data Residency, and have CoPilot enabled. It's the same as the normal github.com setup with one small but significant difference. The url is customer specific. e.g. https://company.ghe.com

This means the URLs look like...

https://company.ghe.com/login/device/code https://company.ghe.com/login/oauth/access_token https://company.ways.ghe.com/copilot_internal/v2/token

I tried to see if I could authenticate without changing anything but these URLs in code and it worked. The issue will be in asking the user for thier "company" name as that is the dynamic element.

IDEs allow this connection a few ways but essentially asking for the Enterprise URL, https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom

@dotned I would be interested in the code workaround, where specifically did you changed it in the code? Are you using a clone install or npm?
Thanks

@FortinFred commented on GitHub (Jul 20, 2025): > Yes, we use ghe.com, GitHub Enterprise with Data Residency, and have CoPilot enabled. It's the same as the normal github.com setup with one small but significant difference. The url is customer specific. e.g. https://company.ghe.com > > This means the URLs look like... > > https://company.ghe.com/login/device/code https://company.ghe.com/login/oauth/access_token https://company.ways.ghe.com/copilot_internal/v2/token > > I tried to see if I could authenticate without changing anything but these URLs in code and it worked. The issue will be in asking the user for thier "company" name as that is the dynamic element. > > IDEs allow this connection a few ways but essentially asking for the Enterprise URL, https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/using-github-copilot-with-an-account-on-ghecom @dotned I would be interested in the code workaround, where specifically did you changed it in the code? Are you using a clone install or `npm`? Thanks
Author
Owner

@dotned commented on GitHub (Jul 22, 2025):

@FortinFred I pulled the code and updated the values directly in the github-copilot.ts file, and ran locally

Image Image
@dotned commented on GitHub (Jul 22, 2025): @FortinFred I pulled the code and updated the values directly in the github-copilot.ts file, and ran locally <img width="690" height="129" alt="Image" src="https://github.com/user-attachments/assets/85f792b0-758d-49c7-98bd-9711d280297a" /> <img width="706" height="117" alt="Image" src="https://github.com/user-attachments/assets/43f026af-b495-433e-94db-eb1f370d8b13" />
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Author
Owner

@lzandman commented on GitHub (Feb 4, 2026):

Why is this closed? Was there an official solution instead of that TypeScript hack? We need this exact thing too.

@lzandman commented on GitHub (Feb 4, 2026): Why is this closed? Was there an official solution instead of that TypeScript hack? We need this exact thing too.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#253