Your token can:
- ✅ Push to branches
- ✅ Read issues
- ❌ Create issues (missing scope)
- Go to: https://github.com/settings/personal-access-tokens/new
- Token name:
nutrient-dws-development - Expiration: 90 days
- Repository access: Selected repositories
- Add:
PSPDFKit/nutrient-dws-client-python
- Add:
- Permissions:
- Repository permissions:
- Contents: Read/Write
- Issues: Read/Write
- Pull requests: Read/Write
- Actions: Read (optional)
- Metadata: Read (required)
- Repository permissions:
- Click "Generate token"
- Copy the token (starts with
github_pat_)
- Go to: https://github.com/settings/tokens/new
- Note:
nutrient-dws-development - Expiration: 90 days
- Select scopes:
- ✅
repo(Full control - includes private repos) - OR just ✅
public_repo(if the repo is public)
- ✅
- Generate and copy token
# Re-authenticate with new token
gh auth login
# When prompted:
# - Choose: GitHub.com
# - Choose: Paste an authentication token
# - Paste your new token# In your terminal
export GITHUB_TOKEN='your_new_token_here'
# Or add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
echo "export GITHUB_TOKEN='your_new_token_here'" >> ~/.zshrc
source ~/.zshrc# Test creating a simple issue
gh issue create --repo PSPDFKit/nutrient-dws-client-python \
--title "Test Issue (Delete Me)" \
--body "Testing token permissions"
# If successful, close it:
gh issue close <issue-number> --repo PSPDFKit/nutrient-dws-client-python- Never commit tokens to git
- Use environment variables or gh auth
- Rotate tokens regularly
- Use minimum required scopes