You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: tokenFromGHCLI fails to resolve token for GHEC (.ghe.com) hosts — causes silent fallback to unauthenticated client #3188
has been completed and no explicit [token] is set in the provider config, the provider should resolve the token from the gh CLI and make authenticated API requests.
Actual Behavior
The provider passes api.my-enterprise.ghe.com (with api. prefix) to gh auth token --hostname, which doesn't match how gh stores GHEC credentials (my-enterprise.ghe.com). The lookup fails silently, the provider falls back to an unauthenticated client, and all API calls return:
Debug logs confirm unauthenticated requests (X-Ratelimit-Limit=60 instead of 5,000+).
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
Activity
github-actions commentedon Feb 12, 2026
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with
Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀deiga commentedon Feb 12, 2026
Thank you for raising this issue!
We're on our way of deprecating the auth with
ghCLI (most likely), so I would recommend using some other method for AuthNclawster commentedon Feb 12, 2026
Thanks for the quick reply.
It looks like I was able to resolve the issue, if you decide to keep gh cli auth mechanism please have a look at my PR.
fix: resolve gh CLI token lookup for GHEC (.ghe.com) hosts
Bugfix: tokenFromGHCLI not stripping api. from ghe.com hosts. Resolves …
Bugfix: tokenFromGHCLI not stripping api. from ghe.com hosts. Resolves …