Skip to content

Unable to use gh in sandbox mode for enterprise setup #5286

Closed

Description

@PeterDaumQS

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

Activity

  1. added theissue type on Oct 29, 2026
  2. added
    area:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settings
    area:permissionsTool approval, security boundaries, sandbox mode, and directory restrictions
    and removed on Oct 30, 2026
  3. self-assigned this
    on Oct 30, 2026
  4. caarlos0 commented on Oct 30, 2026

    @caarlos0
    Member

    Thanks, will be fixed on the next version.

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

Metadata

Metadata

Assignees

Labels

area:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settingsarea:permissionsTool approval, security boundaries, sandbox mode, and directory restrictions

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions