You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/tokens.md
-44Lines changed: 0 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,50 +7,6 @@ sidebar:
7
7
8
8
GitHub Agentic Workflows authenticate using multiple tokens depending on the operation. This reference explains which token to use, when it's required, and how precedence works across different operations.
9
9
10
-
## Quick start: tokens you actually configure
11
-
12
-
GitHub Actions always provides `GITHUB_TOKEN` for you automatically.
13
-
For GitHub Agentic Workflows, you only need to create a few **optional** secrets in your own repo:
14
-
15
-
| When you need this… | Secret to create | Notes |
| Assigning agents/bots to issues or pull requests |`GH_AW_AGENT_TOKEN`| Used by `assign-to-agent` and Copilot assignee/reviewer flows. |
20
-
| Isolating MCP server permissions (advanced optional) |`GH_AW_GITHUB_MCP_SERVER_TOKEN`| Only if you want MCP to use a different token than other jobs. |
21
-
22
-
Create these as **repository or organization secrets in *your* repo**, for example with the GitHub CLI:
23
-
24
-
```bash
25
-
gh secret set GH_AW_GITHUB_TOKEN -a actions --body "YOUR_PAT"
26
-
gh secret set COPILOT_GITHUB_TOKEN -a actions --body "YOUR_COPILOT_PAT"
27
-
gh secret set GH_AW_AGENT_TOKEN -a actions --body "YOUR_AGENT_PAT"
28
-
```
29
-
30
-
After these are set, gh-aw will automatically pick the right token for each operation; you should not need per-workflow PATs in most cases.
31
-
32
-
### Security and scopes (least privilege)
33
-
34
-
- Use `permissions:` at the workflow or job level so `GITHUB_TOKEN` only has what that workflow needs (for example, read contents and write PRs, but nothing else):
35
-
36
-
```yaml
37
-
permissions:
38
-
contents: read
39
-
pull-requests: write
40
-
```
41
-
42
-
- When creating each PAT/App token above, grant access **only** to the repos and scopes required for its scenario (cross-repo Project Ops, Copilot, agents, or MCP) and nothing more.
43
-
- Only expose powerful secrets to the jobs that need them by scoping them to `env:` at the job or step level, not globally:
0 commit comments