0

I recently put together an R package for my company and am trying to figure out why we are all getting 404 errors trying to install it via the RStudio command line. We all have access to the repo (can open it in GitHub). We can download it and install it fine, but if we try to use install_github() it fails. I have been beating my head against a wall for hours now trying to figure this out.

github repo is HDR-D3/HDRRAS
install_packages("HDR-D3/HDRRAS")
devtools::install_github("HDR-D3/HDRRAS")
remotes::install_github("HDR-D3/HDRRAS")


everything yields the same error:
Error: Failed to install 'HDRRAS' from GitHub:
  HTTP error 404.
  Not Found

  Did you spell the repo owner (`HDR-D3`) and repo name (`HDRRAS`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
  • Is the repo publicly available? Or is it private? Have you provided any credentials to R so it can log in? What exactly are you running? – MrFlick Aug 09 '23 at 19:39
  • It is a private repo. I haven't provided any credentials via the install_git command, but my credentials are in the RStudio environment already via PAT. Exact install code I'm using is in updated post. – Zachary Lehmann Aug 09 '23 at 20:05
  • 1
    I think you need to explicitly pass the auth token. See this existing question: https://stackoverflow.com/questions/21171142/how-to-install-r-package-from-private-repo-using-devtools-install-github. I don't have a private github repo to try it with myself. – MrFlick Aug 10 '23 at 13:50

1 Answers1

0

As MrFlick suggested adding the auth_token parameter to the install method works.