Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The PAT scope "read:repo" vs "public_repo" #167

Closed
lukech opened this issue Sep 4, 2024 · 3 comments · Fixed by #168
Closed

The PAT scope "read:repo" vs "public_repo" #167

lukech opened this issue Sep 4, 2024 · 3 comments · Fixed by #168

Comments

@lukech
Copy link

lukech commented Sep 4, 2024

In the "Actions" section of the readme, "read:repo" is listed as one scope that needs to be selected when creating a personal access token (PAT). When attempting to create a PAT (the classic) I found that "read:repo" was not an option ("read:repo_hook" is the closest one that I ticked). With this PAT/secret my Github actions run (the "build" job) failed with the below signature, indicating the "public_repo" scope is required.

GraphqlResponseError: Request failed due to following response errors:
 - Your token has not been granted the required scopes to execute this query. The 'totalCount' field requires one of the following scopes: ['public_repo'], but your token has only been granted the: ['read:org', 'read:project', 'read:repo_hook'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.

After recreating a new PAT with the "public_repo" scope (besides "read:org" and "read:project") the build step passed.

Could someone please confirm that the non-existent "read:repo" PAT scope should be replaced by the "public_repo" scope in the readme? Thanks.

@lukech lukech changed the title "read:repo The PAT "read:repo" vs "public_repo" scope Sep 4, 2024
@lukech lukech changed the title The PAT "read:repo" vs "public_repo" scope The PAT scope "read:repo" vs "public_repo" Sep 4, 2024
@bmuenzenmeyer
Copy link
Contributor

Could someone please confirm that the non-existent "read:repo" PAT scope should be replaced by the "public_repo" scope in the readme? Thanks.

Not with the GH OSPO, but my company's, and I can confirm that public_repo worked for me today

@lukech
Copy link
Author

lukech commented Sep 10, 2024

Thanks for confirming @bmuenzenmeyer. I hope one of the maintainers could advise if the readme needs an update by including the "public_repo" scope (and possibly removing the "read:repo" scope).

@ChrisCarini
Copy link

Also confirmed. Gave an approval to #168 (review) - hopefully one of the maintainers of this repo takes a look and accepts the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants