Skip to content

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

Open

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions