Skip to content

Error during sign-in: fetch failed - Github Enterprise #705

@markman123

Description

@markman123

Describe the bug

When attempting to login to a GHE (Github Enterprise) instance, it fails with Error during sign-in: fetch failed.

Detailed logs suggest it is attempting to use gh CLI, so I installed that and successfully completed its auth path.

Affected version

0.0.365

Steps to reproduce the behavior

  1. Open copilot
  2. Run /login
  3. Select 2. GitHub Enterprise Cloud with data residency (*.ghe.com)
  4. Input ghe domain and hit enter

Expected behavior

Successful login, using proxy information after patch applied in response to #41

Additional context

Before installing gh

2025-12-03T03:00:24.307Z [INFO] Starting Copilot CLI: 0.0.365
Commit: 76d0881
2025-12-03T03:00:24.307Z [INFO] Node.js version: v22.15.0
2025-12-03T03:00:24.603Z [INFO] Login status unknown
2025-12-03T03:00:24.927Z [ERROR] Error checking for updates: TypeError: Cannot read properties of undefined (reading 'paths')
2025-12-03T03:00:24.935Z [START-GROUP] gh auth token --hostname github.com
2025-12-03T03:00:24.937Z [ERROR] Error: spawn gh ENOENT
2025-12-03T03:00:24.937Z [END-GROUP]

Log output after installing ghe (note it's still using github.com and not ghe)

2025-12-03T03:30:45.498Z [INFO] Starting Copilot CLI: 0.0.365
Commit: 76d0881
2025-12-03T03:30:45.499Z [INFO] Node.js version: v22.15.0
2025-12-03T03:30:45.789Z [INFO] Login status unknown
2025-12-03T03:30:46.099Z [ERROR] Error checking for updates: TypeError: Cannot read properties of undefined (reading 'paths')
2025-12-03T03:30:46.105Z [START-GROUP] gh auth token --hostname github.com
2025-12-03T03:30:46.112Z [START-GROUP] gh auth token --hostname github.com
2025-12-03T03:30:46.127Z [START-GROUP] gh auth token --hostname github.com
2025-12-03T03:30:46.197Z [ERROR] no oauth token found for github.com

2025-12-03T03:30:46.197Z [END-GROUP] 
2025-12-03T03:30:46.197Z [DEBUG] Failed to retrieve GitHub token from CLI (exit code: 1): no oauth token found for github.com
2025-12-03T03:30:46.197Z [ERROR] no oauth token found for github.com

2025-12-03T03:30:46.198Z [END-GROUP] 
2025-12-03T03:30:46.198Z [DEBUG] Failed to retrieve GitHub token from CLI (exit code: 1): no oauth token found for github.com
2025-12-03T03:30:46.198Z [DEBUG] No auth info available, skipping custom agents load
2025-12-03T03:30:46.204Z [INFO] Logged out
2025-12-03T03:30:46.214Z [ERROR] no oauth token found for github.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions