You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide instructions for GitHub's new "fine-grained" personal access tokens #6092
It's still in beta and we deep link to the existing page already. Good to keep an eye on, but probably not something we want to make any changes for now.
I was going to open a new issue about it yesterday but I wasn't sure if we need to make any changes at all. For Refined GitHub to work, we need write access to all repos, which seems to still be available.
I don't particularly want to spend time requesting exclusively the permissions we're currently using and then having to deal with broken new features later. If the user decides to customize the page, they'd do at their own peril/safety.
We will likely still need to update the options UI though to ensure we correctly represent partial permissions, if any.
I was going to generate a new beta token (i.e. a fine-grained token) because my classic token doesn't work anymore in a private organization. Refined GitHub logs this to the console:
ℹ️ ci-link → GraphQL: redacted_organization_name forbids access via a personal access token (classic). Please use a GitHub App, OAuth App, or a personal access token with fine-grained permissions.
I don't know what permissions I should choose when generating a beta token, so documentation would be nice.
I anyway tried generating a beta token, but Refined GitHub's options page seems to accept only classic tokens (ghp_...), not beta tokens (github_pat_...):
Support for fine-grained tokens should come in the next release.
Nice!
I've been using the same classic token for a while and it works even on private repos.
My classic token has also worked in private repos so far, but today I noticed that it doesn't work in a repo under a certain private organization. So I think it's an organization-level setting; the console logging quoted in my previous comment also says so (or so I interpret it):
organization_foo forbids access via a personal access token (classic). [...]
Step 3 is "Restrict access via personal access tokens (classic)" – I think my problem stems from this, but I can't check the settings of the problematic organization because I'm not authorized to do that.
(Whoops, a bit off topic maybe.)
Edit: whoops 2: I have been talking about "private organizations," but I don't know if they are even a thing.
Update: in most cases, you can continue using the classic tokens without issue. GitHub’s error message with workflow is actually super clear so we don't need to update anything at this point.
This is now purely a documentation issue and I don't see the urgency to document it just yet (also because we'd also have to update the scope-checker widget, etc etc)
This is now purely a documentation issue and I don't see the urgency to document it just yet (also because we'd also have to update the scope-checker widget, etc etc)
Hey @fregante , I think it would be a nice to have update since a lot of organizations have disabled Classic PATs and the extension is unusable in those cases 😢
Fine-grained tokens are ultimately not compatible with Refined GitHub at the moment.
Classic tokens give access to the same repositories a user has access to, but fine-grained are scoped per-user/per-organization.
Supporting multiple tokens would requires a lot of code changes around the options page and API calls, it's not going to happen until GitHub sunsets classic tokens
You literally cannot create tokens for some organizations, for example I'm part of 8 organizations but can only create tokens for 2
It looks like there's no URL shortcut to pre-fill the form, like there used to be
If your organization does not support classic tokens, then Refined GitHub can only read public data from those organizations
If you want to use a fine-grained token, feel free to do so, but we're not going to keep a documentation page with all the (ever-changing) scope needs required. If you want to limit access to Refined GitHub, you will have to go through each scope anyway. Feel free to leave a comment with your findings though.
Note that we don't have access to the token nor do we ever collect any data, so you're effectively only limiting your own machine.
In the future:
If GitHub completely sunsets classic tokens, we can reconsider then. Maybe switch to a hosted GitHub App
Activity
busches commentedon Oct 20, 2022
It's still in beta and we deep link to the existing page already. Good to keep an eye on, but probably not something we want to make any changes for now.
fregante commentedon Oct 20, 2022
I was going to open a new issue about it yesterday but I wasn't sure if we need to make any changes at all. For Refined GitHub to work, we need write access to all repos, which seems to still be available.
I don't particularly want to spend time requesting exclusively the permissions we're currently using and then having to deal with broken new features later. If the user decides to customize the page, they'd do at their own peril/safety.
We will likely still need to update the options UI though to ensure we correctly represent partial permissions, if any.
fregante commentedon Oct 21, 2022
Never mind, they actually broke existing tokens too, probably by mistake. This is what I see after clicking
Update PRmtsknn commentedon May 10, 2023
I was going to generate a new beta token (i.e. a fine-grained token) because my classic token doesn't work anymore in a private organization. Refined GitHub logs this to the console:
I don't know what permissions I should choose when generating a beta token, so documentation would be nice.
I anyway tried generating a beta token, but Refined GitHub's options page seems to accept only classic tokens (
ghp_...), not beta tokens (github_pat_...):refined-github/source/options.html
Line 22 in 747b87a
refined-github/source/options.tsx
Lines 97 to 101 in 747b87a
fregante commentedon May 10, 2023
Thanks for the detailed report, @mtsknn!
Support for fine-grained tokens should come in the next release.
That can be customize in the token itself, I've been using the same classic token for a while and it works even on private repos. See this screenshot taken on https://github.com/refined-github/private/issues/1 with a classic token and with
bugs-tabworking (which requires a token)mtsknn commentedon May 10, 2023
Nice!
My classic token has also worked in private repos so far, but today I noticed that it doesn't work in a repo under a certain private organization. So I think it's an organization-level setting; the console logging quoted in my previous comment also says so (or so I interpret it):
Organization settings > Personal access tokens (e.g. https://github.com/organizations/refined-github/settings/personal-access-tokens-onboarding) looks like this in one of my own private organizations:
Step 3 is "Restrict access via personal access tokens (classic)" – I think my problem stems from this, but I can't check the settings of the problematic organization because I'm not authorized to do that.
(Whoops, a bit off topic maybe.)
Edit: whoops 2: I have been talking about "private organizations," but I don't know if they are even a thing.
fregante commentedon Jun 1, 2023
Update: in most cases, you can continue using the classic tokens without issue. GitHub’s error message with workflow is actually super clear so we don't need to update anything at this point.
This is now purely a documentation issue and I don't see the urgency to document it just yet (also because we'd also have to update the scope-checker widget, etc etc)
Please open new bug reports if you find bugs. 🐛
thealphadollar commentedon Aug 18, 2023
Hey @fregante , I think it would be a nice to have update since a lot of organizations have disabled Classic PATs and the extension is unusable in those cases 😢
amaisano commentedon Sep 18, 2023
Is this why I am now unable to use the
(X)button on labels on my PR? I receive this error:134130 commentedon Sep 18, 2023
@amaisano It seems. Your organization maybe forbids Classic token.
fregante commentedon Sep 23, 2023
Fine-grained tokens are ultimately not compatible with Refined GitHub at the moment.
Classic tokens give access to the same repositories a user has access to, but fine-grained are scoped per-user/per-organization.
Supporting multiple tokens would requires a lot of code changes around the options page and API calls, it's not going to happen until GitHub sunsets classic tokens
You literally cannot create tokens for some organizations, for example I'm part of 8 organizations but can only create tokens for 2
It looks like there's no URL shortcut to pre-fill the form, like there used to be
refined-github/source/options.html
Line 20 in e9e650d
In short:
In the future:
Please open new issues if you encounter specific bugs with fine-grained tokens