Skip to content

Support GitHub Enterprise Cloud data residency API URLs (*.ghe.com)#588

Open
sraisl wants to merge 1 commit intomyoung34:masterfrom
sraisl:support-ghe-data-residency
Open

Support GitHub Enterprise Cloud data residency API URLs (*.ghe.com)#588
sraisl wants to merge 1 commit intomyoung34:masterfrom
sraisl:support-ghe-data-residency

Conversation

@sraisl
Copy link
Copy Markdown

@sraisl sraisl commented Apr 24, 2026

Problem

GitHub Enterprise Cloud with data residency uses API endpoints like:

https://api.<subdomain>.ghe.com

The current implementation treats all non-github.com hosts as GHES and uses:

https://<host>/api/v3

This leads to invalid token generation and runner registration failures:

Invalid configuration provided for token

Solution

  • Detect *.ghe.com hosts
  • Use https://api.<host>
  • Normalize GITHUB_HOST (strip https://)

Impact

  • Fixes runner registration for GHE Cloud with data residency
  • Keeps existing behavior for GHES and github.com

Closes #589

@myoung34
Copy link
Copy Markdown
Owner

myoung34 commented May 4, 2026

The better fix is to set _GITHUB_HOST to what you need and add a boolean or something for the /api/v3

@sraisl sraisl force-pushed the support-ghe-data-residency branch from 9422734 to e7beaf2 Compare May 4, 2026 05:20
@sraisl
Copy link
Copy Markdown
Author

sraisl commented May 4, 2026

Updated this to avoid special-casing *.ghe.com.

GITHUB_HOST remains the runner/web host, while GITHUB_API_HOST can now be set when the API host differs. GITHUB_API_V3 controls whether /api/v3 is appended, preserving the existing GHES default while supporting GHEC data residency with:

GITHUB_HOST=<subdomain>.ghe.com
GITHUB_API_HOST=api.<subdomain>.ghe.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support GitHub Enterprise Cloud data residency (*.ghe.com) API URLs

2 participants