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

install attempts gave 401 and "unable to access repo index" #4

Open
benthestatistician opened this issue Aug 12, 2024 · 3 comments
Open

Comments

@benthestatistician
Copy link

I got a 401 when I tried to install using install_github():

> devtools::install_github("josherrickson/rrelaxiv@*release")
Error in github_resolve_ref.github_release(meta$ref %||% ref, meta, host = host,  : 
  Cannot find repo josherrickson/rrelaxiv.
HTTP error 401.
  Bad credentials

  Rate limit remaining: 59/60
  Rate limit reset at: 2024-08-12 16:48:25 UTC

Maybe the fix should be on my end, as I also got:

Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead.

If there's something users should do about their github PAT before trying this, then we might consider alerting them to this on the webpage.

In a similar vein, from reading the webpage I figured I'd start by trying the drat method, despite running this from a linux box for which there are no binaries there. This gave me the error below. If the issue is that linux users shouldn't be trying the drat method, perhaps the website could flag this; I'm also sharing it in case it really is alerting us to a site configuration issue.

> drat::addRepo("rrelaxiv", "https://errickson.net/rrelaxiv")
> install.packages("rrelaxiv")
Installing package into/home/bbh/R/x86_64-pc-linux-gnu-library/4.4’
(aslibis unspecified)
Warning: unable to access index for repository https://errickson.net/rrelaxiv/src/contrib:
  Line starting '<!DOCTYPE html> ...' is malformed!
Warning message:
packagerrelaxivis not available for this version of R

(Using devtools v. 2.4.5 and drat v. 0.2.4 on R 4.4.1, platform x86_64-pc-linux-gnu.)

@josherrickson
Copy link
Owner

I have no issues on my end running the devtools install, so it's likely either on your end or a github issue. As far as I know, you don't need any special github permissions to install this way; you should be able to install without any github account. Have you tried again recently? Cannot find repo josherrickson/rrelaxiv reads like an internet issue.

I'll look into drat when I get a chance.

@benthestatistician
Copy link
Author

Update: I got the devtools::install_github() command to work by removing an outdated GITHUB_PAT from my ~/.Renviron. (It was the only thing declared in that file, so I just deleted it; elsewhere I see the advice to create a new PAT and store it locally via usethis::edit_r_environ().)

My remaining drat-related concern could be address by adding a line to the README pointing *nix users away from using drat to install rrelaxiv. If indeed that's what's suggested.

@josherrickson
Copy link
Owner

josherrickson commented Sep 5, 2024

Installing via drat on *nix should work. There's something else going on with the site. I'll need to find time to look into this more.

I do wonder if we should stop supporting drat. It's always been a bit flaky, and requires a not insignificant amount of attention every times there's an R release. We can just support installing from source via install_github, and if a user has real issues with it, we can try to build the binaries for them.

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

No branches or pull requests

2 participants