gh-copilot
gh-copilot copied to clipboard
[BUG]: Error: unsupported host: git.<company>.com
Thanks for taking the time to fill out this out! :bow: By submitting this issue, you agree to follow our Code of Conduct.
What happened?
I was successfully using gh-copilot (just learned that it exists) within our domain. After updating to the latest version, I now get the error message: Error: unsupported host: git.<company>.com (masked the company name).
Versions
gh version 2.64.0 (2024-12-18) gh copilot version 1.1.0 (2025-02-10)
Relevant terminal output
gh copilot suggest "something"
Is this a new limitation?
Hey @messerm, thanks for reaching out. So this is an interesting situation, as I don't think we ever explicitly built support for GitHub Enterprise customers into gh copilot (which I assume you are using because of the host string git.<company>.com. If this was working before, that was a happy accident 😅
I'll look into this, but in the mean time do you happen to know what version of gh and gh copilot you were using when this was successfully executing? It would be helpful to see any log output for both the old and new versions. You can grab this by preceding your command with GH_DEBUG=api, like this:
GH_DEBUG=api gh copilot suggest "something"
We automatically redact sensitive information in the output, but if masking your company is important you'll want to clean that up before posting it here.
Once you get me those log outputs I can really dive into this 🙌
@jtmcg Thanks for your reply, unfortunately I cannot tell what version I used before. It was new to me that copilot is supported in gh cli and I was just playing around a bit. It is not yet part of any process, but I would have some ideas :).
Here the output, it doesn't seem to have any company specific details.
❯ GH_DEBUG=api gh copilot suggest "something" ─╯
* Request at 2025-02-28 09:34:19.813663 +0100 CET m=+0.144707668
* Request to https://api.github.com/repos/github/gh-copilot/releases/latest
> GET /repos/github/gh-copilot/releases/latest HTTP/1.1
> Host: api.github.com
> Accept: application/vnd.github.merge-info-preview+json, application/vnd.github.nebula-preview
> Authorization: token <yep>
> Content-Type: application/json; charset=utf-8
> Time-Zone: Europe/Zurich
> User-Agent: GitHub CLI 2.64.0
> X-Gh-Cache-Ttl: 30s
✗ Error: unsupported host: git.autodesk.com
Yeah, it looks like you're not even making it to any of the copilot evaluation logic. Makes sense, given what I see in the code. Like I said before, we haven't actually built support for this yet, so there's not much I can do to help, here. I'll surface this gap to the team again, though, and see what we can do about prioritizing it.
Thanks for the reminder!