GitHub Token
GitHub Token
kpil requires a GitHub personal access token (PAT) to authenticate the Copilot CLI inside the container.
Required permission
| Permission | Scope | Level |
|---|---|---|
copilot_requests | Account | write |
No repository or organisation permissions are needed.
Create a fine-grained PAT
- Go to GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens
- Click Generate new token
- Set an expiration
- Under Account permissions, set
copilot_requests→ Read and write - Click Generate token and copy the value
Use the token
export GH_TOKEN=github_pat_xxxxxxxxxxxx
kpilThe token is forwarded to the container via the GH_TOKEN environment variable and is never written to disk.