Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

The GH_AW_AGENT_TOKEN documentation listed required permissions but omitted resource owner requirements, which vary based on repository ownership and cause authentication failures when misconfigured.

Changes

  • Restructured setup section into user-owned vs organization-owned repository flows
  • Added resource owner specifications:
    • User-owned repos: Resource owner = user account
    • Organization-owned repos: Resource owner = organization
  • Added explanatory note clarifying that token resource owner must match repository ownership

This aligns the GH_AW_AGENT_TOKEN documentation with the existing pattern established in the ProjectOps token section.

Configuration Example

For an organization-owned repository:

# Create fine-grained PAT with:
# - Resource owner: your-org (must match repo owner)
# - Repository access: Select specific repos
# - Repository permissions:
#   - Actions: Write
#   - Contents: Write
#   - Issues: Write
#   - Pull requests: Write
gh aw secrets set GH_AW_AGENT_TOKEN --value "YOUR_AGENT_PAT"

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /opt/hostedtoolcache/node/24.12.0/x64/bin/node node /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Improve section on GH_AW_AGENT_TOKEN. The permissions are correct, but it is missing a section on who the resource owner should be so that it works correctly based on who owns the repo (see section in ProjectOps) and write something comparable here.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve section on GH_AW_AGENT_TOKEN ownership Add resource owner guidance to GH_AW_AGENT_TOKEN documentation Jan 15, 2026
Copilot AI requested a review from mnkiefer January 15, 2026 13:41
@mnkiefer mnkiefer marked this pull request as ready for review January 15, 2026 13:42
@mnkiefer mnkiefer merged commit 9282f14 into main Jan 15, 2026
2 checks passed
@mnkiefer mnkiefer deleted the copilot/improve-gh-aw-agent-token-section branch January 15, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants