Skip to content

Commit e70e02f

Browse files
sunbryeCopilotCopilot
authored
Clarify FG PAT must be user-owned for Copilot CLI auth (#60990)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent da38aa2 commit e70e02f

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎content/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Offline mode is **only fully air-gapped** if your BYOK provider is local or othe
5353
| Token type | Prefix | Supported | Notes |
5454
|----------------------------|---------------|-----------|--------------------------------------------------------|
5555
| OAuth token (device flow) | `gho_` | Yes | Default method via `copilot login` |
56-
| Fine-grained PAT | `github_pat_` | Yes | Must include required permissions **Copilot Requests** |
56+
| Fine-grained PAT | `github_pat_` | Yes | Must be owned by your personal account (not an organization) with the **{% data variables.product.prodname_copilot_short %} Requests** account permission |
5757
| GitHub App user-to-server | `ghu_` | Yes | Via environment variable |
5858
| Classic PAT | `ghp_` | No | Not supported by {% data variables.copilot.copilot_cli_short %} |
5959

‎content/copilot/how-tos/copilot-cli/set-up-copilot-cli/troubleshoot-copilot-cli-auth.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The token was revoked, has expired, or was created without the required permissi
102102

103103
### Fix
104104

105-
Review the token's status and permissions on {% data variables.product.prodname_dotcom %}. The token must have the **Copilot Requests** permission. Generate a new token with the required permissions if necessary.
105+
Review the token's status and permissions on {% data variables.product.prodname_dotcom %}. The token must be a {% data variables.product.pat_v2 %} owned by your **personal account** (not an organization) with the **{% data variables.product.prodname_copilot_short %} Requests** permission. Generate a new token with the required permissions if necessary.
106106

107107
## {% data variables.product.pat_classic_caps %} rejected
108108

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
1. Visit [{% data variables.product.pat_v2_caps_plural %}](https://github.com/settings/personal-access-tokens/new).
2-
1. Under "Permissions," click **Add permissions** and select **{% data variables.product.prodname_copilot_short %} Requests**.
2+
1. Under **Resource owner**, select your **personal account**. Do not select an organization. The **{% data variables.product.prodname_copilot_short %} Requests** permission is only available on user-owned {% data variables.product.pat_v2_plural %}.
3+
1. Under **Repository access**, select the level of access appropriate for your use case:
4+
* **Public repositories** if you only need to work with public repos.
5+
* **All repositories** if you need access across all your current and future repos.
6+
* **Only select repositories** f you want to restrict access to specific repos.
7+
1. Under **Permissions**, select the **Account** tab.
8+
1. Click **Add permissions** and select **{% data variables.product.prodname_copilot_short %} Requests**.
39
1. Click **Generate token**.
4-
1. Export the token in your terminal or environment configuration. Use the `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` environment variable (in order of precedence).
10+
1. Export the token in your terminal or environment configuration. Use the `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` environment variable (in order of precedence).

0 commit comments

Comments
 (0)