Unable to use gh in sandbox mode for enterprise setup
Describe the bug
Hi,
I'm testing the sandbox right now and found a flaw blocking me from using it.
We have use github enterprise and it turns out, that the proxy is not able to forward the token to gh when the remote system is *.ghe.com.
See the documentation for reference:
Authenticate gh Provide a placeholder GH_TOKEN so GitHub CLI (gh, not copilot) can authenticate without accessing its stored credentials. The proxy supplies the real token only to github.com, api.github.com, and uploads.github.com. Turned on by default.
Affected version
GitHub Copilot CLI 1.0.105.
Steps to reproduce the behavior
- have access to an ghe host and a repo with some issues
- start copilot with
GH_TOKEN=$(gh auth token --hostname "ghe host") copilot --sandboxalternatively try it withGH_ENTERPRISE_TOKEN=$(gh auth token --hostname "ghe host") copilot --sandbox - configure the secret to be forwarded to
*.ghe hostandghe host - ask copilot to list the issues via
gh
Expected behavior
copilot in sandbox mode is forwarding the auth token also for ghe hosts. thus gh become usable for copilot in sandbox mode.
Additional context
No response
Thanks, will be fixed on the next version.