Open tylermorganwall opened 4 months ago
Are you sure that your GitHub PAT is correct?
I have regenerated a new token, added it via gitcreds::gitcreds_set()
, confirmed it's correct via both gh::gh_whoami()
and that it matches what is listed in gitcreds::gitcreds_get()$password
, and successfully pushed a commit to a repo I own (here, I add the rhub GHA workflow to another package, which successfully then runs rhub_doctor()
). (https://github.com/tylermorganwall/rayvertex/commit/c6ef676cbe2be48c4daf89d22dca30200f18f672)
> rhub::rhub_doctor()
✔ Found R package at /Users/tyler/Desktop/R/rayvertex.
✔ Found git repository at /Users/tyler/Desktop/R/rayvertex.
✔ Found GitHub PAT.
✔ Found repository on GitHub at <https://github.com/tylermorganwall/rayvertex.git>.
✔ GitHub PAT has the right scopes.
✔ Found R-hub workflow in default branch, and it is active.
→ WOOT! You are ready to run rhub::rhub_check() on this package.
After all of that, running this in my project for rayimage returns the following:
> gh::gh_whoami()
{
"name": {},
"login": "tylermorganwall",
"html_url": "https://github.com/tylermorganwall",
"scopes": "gist, repo, user, workflow",
"token": "(correct token)"
}
> gitcreds::gitcreds_get()
<gitcreds>
protocol: https
host : github.com
username: PersonalAccessToken
password: <-- hidden -->
> rhub::rhub_doctor()
✔ Found R package at /Users/tyler/Desktop/R/rayimage.
✔ Found git repository at /Users/tyler/Desktop/R/rayimage.
✔ Found GitHub PAT.
Error in `resp$content$data`:
! $ operator is invalid for atomic vectors
Type .Last.error to see the more details.
Is it a fine-grained or a classic token? rhub_doctor()
only works with a classic token currently. rhub_check()
should still work with a fine-grained token, though.
Classic token.
I have been trying to set up rhub on my package rayimage, but I was getting an odd error when calling both rhub_check() and rhub_doctor:
I used
trace()
to pinpoint the issue to theresp
variable:Specifically, the content was the following:
(in ASCII, this is "Cookies must be enabled to use GitHub.")
I'm not sure why
rhub_check()
andrhub_doctor()
is failing, but the functions should probably be fixed to parse this response and return the error in human readable form.sessionInfo: