-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the feature or problem you’d like to solve
HTTP 403: Must have admin rights to Repository. (https://api.github.com/repos/scarf005/pyvips)
This API operation needs the "delete_repo" scope. To request it, run: gh auth refresh -h github.com -s delete_repoafter repo deletion, I wanted to revoke delete_repo scope given with gh auth refresh, since I did not want to accidently delete repos.
The --scopes flag accepts a comma separated list of scopes you want your gh credentials to have. If absent, this command ensures that gh has access to a minimum set of scopes.
I ran gh auth refresh again as the description in cli doc said.
but to my surprise cli still had access to repository deletion. as said in #5083, current way to revoke github cli's scope is to completely de-authorize github cli app. this is very inconvenient.
Proposed solution
gh repo request should follow the documentation and revoke access to the point of minimum set of scopes.
in this example, Delete Repositories access should be revoked.
Discussed in #5083
Originally posted by pritambera2000 January 23, 2022
How to revoke scopes on gh auth refresh . After granting a scope can't revoke it from cli
