Skip to content

GHES: Create prerequisites guide and troubleshooting runbook for Copilot engine #20968

Description

@lpcox

Problem

There is no GHES-specific documentation for setting up agentic workflows with the Copilot engine. Users discover requirements through trial and error, facing hours of debugging for issues that have straightforward solutions.

Proposal: GHES Prerequisites Guide

Create documentation covering:

Prerequisites (site admin)

  • GitHub Connect must be enabled (connects GHES to github.com for Copilot cloud services)
  • Copilot licensing must be purchased and enabled at the enterprise level
  • Network: Firewall must allow outbound to api.githubcopilot.com, api.enterprise.githubcopilot.com

Prerequisites (enterprise/org admin)

  • Copilot seats must be assigned to the user whose PAT is used as COPILOT_GITHUB_TOKEN
  • Token type: Fine-grained PAT with copilot_requests:read account permission (or classic PAT with copilot scope)
  • Organization Copilot policy must allow the org to use Copilot

Workflow configuration

  • engine.api-target must be set to api.<ghes-host>
  • GHES domains must be added to firewall allowed domains
  • GH_HOST must be configured for gh CLI commands

Proposal: Troubleshooting Runbook

Document known failure modes with solutions:

SymptomCauseSolution
Error loading models: 400 Bad RequestCopilot not licensed or API proxy routing wrongCheck enterprise Copilot settings; see gh-aw-firewall#1300
403 "unauthorized: not licensed to use Copilot"No Copilot license/seat assignedSite admin: enable Copilot; org admin: assign seat
403 "Resource not accessible by personal access token"Wrong token type or missing permissionsUse fine-grained PAT with copilot_requests:read
Firewall blocks api.<ghes-host>:443GHES domain not in allowed listAdd to engine.api-target or --allow-domains
Could not resolve to a RepositoryGH_HOST not setAdd GHE configuration step to workflow
Wizard PR creation failsWizard targets github.comUse gh aw add + manual gh pr create (see #20875)
gh aw audit failsSame GH_HOST issueGH_HOST=<ghes-host> gh aw audit <run-id>

Evidence

All of these issues were encountered and resolved during setup of agentic workflows on contoso-aw.ghe.com. Each required significant debugging time that documentation would have prevented.

Related

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions