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
docs: add GitHub token configuration and debugging scripts
- Add comprehensive documentation for fixing GitHub token permissions
- Add diagnostic scripts for troubleshooting token authentication issues
- Add scripts to verify token scopes, SSO status, and PAT restrictions
- Add setup script for configuring GitHub tokens for issue creation
- Document the resolution process for authentication failures
- Can perform all operations EXCEPT create issues via API
7
+
- Error: "Resource not accessible by personal access token"
8
+
9
+
## Most Likely Cause: Fine-Grained PAT Repository Access
10
+
11
+
Since you're using a fine-grained personal access token (github_pat_...), and this repository was created AFTER your token, the issue is likely:
12
+
13
+
**Your fine-grained PAT was created before this repository existed, so it doesn't include this repository in its access list.**
14
+
15
+
Fine-grained PATs have repository-specific access lists. When you create a token, you select which repositories it can access. Repositories created after the token won't automatically be included.
16
+
17
+
## Solution
18
+
19
+
### Option 1: Update Your Existing Token
20
+
1. Go to: https://github.com/settings/personal-access-tokens
21
+
2. Find your current token
22
+
3. Click the pencil icon to edit
23
+
4. Under "Repository access", ensure `PSPDFKit/nutrient-dws-client-python` is explicitly selected
24
+
5. Under "Repository permissions", verify:
25
+
- Contents: Write
26
+
- Issues: Write
27
+
- Pull requests: Write
28
+
6. Save the token
29
+
30
+
### Option 2: Create a New Token
31
+
1. Go to: https://github.com/settings/personal-access-tokens/new
32
+
2. Select "All repositories" OR explicitly add `PSPDFKit/nutrient-dws-client-python`
33
+
3. Set permissions:
34
+
- Contents: Write
35
+
- Issues: Write
36
+
- Pull requests: Write
37
+
4. Generate and use the new token
38
+
39
+
### Option 3: Use a Classic Token
40
+
Classic tokens don't have repository-specific restrictions:
41
+
1. Go to: https://github.com/settings/tokens/new
42
+
2. Select `repo` scope
43
+
3. Generate and use this token
44
+
45
+
## Why This Happens
46
+
- Fine-grained PATs must explicitly list each repository
47
+
- New repositories aren't automatically added to existing tokens
48
+
- This explains why you can do everything else (push, PRs) but not create issues - the API might have different permission checks
echo"Checking if we can access the PSPDFKit org repos:"
58
+
gh api orgs/PSPDFKit/repos --paginate --jq '.[].name'| grep -E "^nutrient-dws-client-python$"||echo"Cannot access PSPDFKit repositories with current token"
0 commit comments