-
Notifications
You must be signed in to change notification settings - Fork 66.6k
GITHUB_TOKEN does not have the correct rights to publish to private repos #21156
Description
Code of Conduct
- I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
What changes are you suggesting?
We have Github workflows where we've tried to use the GITHUB_TOKEN to publish packages to github packages. These are scoped packages that point to repositories owned by our organization. We do not want to use a PAT.
We have given packages: write permissions to the Github workflows. We get 403 errors saying this token doesn' t have permissions to publish the package.
https://github.com/Contrast-Security-Inc/skeletor/actions/runs/3198674064/jobs/5223496673
This section of the documentation says that a PAT is required to write those packages:
https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-with-a-personal-access-token
But according to this issue and blog post, reading and writing a scoped package should now be supported by adding permissions to the GITHUB_TOKEN:
actions/setup-node#49 (comment)
Can this conflicting information in the documentation be resolved and added to the original article?
Additional information
No response