Fine-grained token steps
- Open GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens.
- Select Generate new token and scope it to this repository.
- Under Repository permissions, grant at least Contents: Read and Actions: Write.
- If you plan to create repositories from the OpenAI Workbench, also enable Administration: Read and write
so GitHub accepts repository creation requests.
- Name the token (for example 3dvr-portal-ci), set an expiration, and generate it.
- Copy the token and store it as a repository secret such as GH_PAT if
you need more than the default GITHUB_TOKEN provides.
Classic token note
If your organization requires classic tokens, generate one under
Personal access tokens (classic) with the repo and
workflow scopes. Store it in the same GH_PAT secret.
Troubleshooting “Resource not accessible by personal access token”
GitHub shows this when the token cannot reach the repository. Fix it with the checklist below:
- Use a token that targets the correct owner: fine-grained for the org/repo, or classic with the
repo scope (and workflow if Actions are used).
- For fine-grained tokens, set the resource owner to the organization and grant
Contents: Read and write plus Metadata: Read-only. Add explicit repo access if not using
“All repositories.”
- If the org enforces SSO, authorize the token under Organization → Settings → Personal access tokens
after creating it.
- Ensure the user account has permission to read/write the repo (or create it) and that stored tokens in CI or the
Workbench have been refreshed.
Once updated, retry the API call or publish step — the error should clear when scopes and
org access match the repository.
Use it in OpenAI Workbench
Jump to the OpenAI Workbench to paste
your token into the GitHub publishing card. That panel saves the token locally while commits and previews
sync through Gun for your team.