-
Notifications
You must be signed in to change notification settings - Fork 53
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
Github PAT does not have the right scopes, but unclear what they should be #601
Comments
Can you please show the full output? |
|
The problem is not with the scopes.
|
If I understand correctly, this is an esoteric error not related to the rhub package. If not, happy to assist with further debugging; otherwise, feel free to close. Would the solution in any case be to generate another PAT? |
Correct. You can try to see what's wrong with your current one, try calling.
(Put the pat in place of If the second works but the first does not, then your PAT is ok, we just can't find it. Try setting it in |
Thank you. I confirm the first |
I'll keep this issue open, to improve the output of |
I have the same error but the solution above (#601 (comment)) doesn't work for me ( The output from
|
What's the output of |
Thanks for your help! |
Sorry, only HTTPS git remotes work currently. |
No, this isn't the problem, unfortunately. I get the same error mesage when I change the remote to https.
|
What do you get for this?
If you look at
do you see the correct token? E.g. does
work correctly? |
They all seem to work apart from that the first command returns NAs for protocol host and username. I won't post the output from the second command (and removed the token line from the third), but I ensured that the second command shows the correct PAT.
|
What's the output of this from the command line, int the directory of the package?
|
I had also tried setting both fetch and push to https, but that didn't work either and |
It appears as if the |
IDK, but that might be enough for me to fix this. I guess you are on Linux, that's why ssh is more convenient? |
Yes, I am on Linux. Strangely enough, if I use Would it help if I send you the |
Do you have a proxy that might alter the headers? Yes, if you think that the response headers could be informative, please send them via email. I don't think they actually contain any sensitive information. |
Hi Gabor - thanks a lot for rhub, it makes a huge difference for package development! Especially tracking down compilation errors on the different flavors. I was also having trouble with PAT scopes. It didn't work with a new fine-grained tokens, but rhub_doctor() worked with the classic personal access token. |
Yes, unfortunately it seems that there is no way to query the scopes of a fine-grained token, so we'll need to drop that check for fine grained tokens. |
I had the same problem with a fine-grained token, switching to a classic token fixed it. On the other side, I am unclear on which scopes to choose for the classic token, is it detailed somewhere in the documentation which scopes should be granted? Thanks! |
Seems like on "repo"` is needed: Lines 165 to 174 in f4c7367
|
great, thanks! I had added the Maybe it would be worth amending the documentation in https://blog.r-hub.io/2024/04/11/rhub2/#requirements along with (suggested changes in bold):
|
Sure, a PR is most welcome! (But no pressure, really! :D) |
I have run rhub::rhub_doctor() and receive the following error:
The answer to this question is "I don't know". Can the error message specify the scopes that are required?
The text was updated successfully, but these errors were encountered: