Skip to content
GitHub Token

GitHub Token

kpil requires a GitHub personal access token (PAT) to authenticate the Copilot CLI inside the container.

Required permission

PermissionScopeLevel
copilot_requestsAccountwrite

No repository or organisation permissions are needed.

Create a fine-grained PAT

  1. Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
  2. Click Generate new token
  3. Set an expiration
  4. Under Account permissions, set copilot_requestsRead and write
  5. Click Generate token and copy the value

Use the token

export GH_TOKEN=github_pat_xxxxxxxxxxxx
kpil

The token is forwarded to the container via the GH_TOKEN environment variable and is never written to disk.