copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Unable to use gh in sandbox mode for enterprise setup

Open PeterDaumQS opened this issue 1 month ago • 1 comments

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.

Docs

Affected version

GitHub Copilot CLI 1.0.105.

Steps to reproduce the behavior

  1. have access to an ghe host and a repo with some issues
  2. start copilot with GH_TOKEN=$(gh auth token --hostname "ghe host") copilot --sandbox alternatively try it with GH_ENTERPRISE_TOKEN=$(gh auth token --hostname "ghe host") copilot --sandbox
  3. configure the secret to be forwarded to *.ghe host and ghe host
  4. 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

PeterDaumQS avatar Oct 29 '26 06:10 PeterDaumQS

Thanks, will be fixed on the next version.

caarlos0 avatar Oct 30 '26 22:10 caarlos0