Skip to content

How can we limit package publishing? #25938

Answered by weide-zhou
mrmckeb asked this question in Actions
Discussion options

You must be logged in to vote

Hi @mrmckeb,

Glad to see you in Github Community Forum!

Typically there are two kinds of token for customer to publish a package.

  1. GITHUB_TOKEN. It has read:packages and write:packages scopes to the current repository by default(doc here), it’s only used in Github Actions.

  2. Personal access token. If the token doesn’t have write:packages scopes, it cannot be used to publish a package. Please refer to the official doc for more details.

Hence, if the customer has write permission to a repository, he/she can use GITHUB_TOKEN in Github actions to publish a package, but limit to PAT token which doesn’t have wirte: package scope.

Cannot limit package publishing in this case.

Thanks

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
2 participants