remotes icon indicating copy to clipboard operation
remotes copied to clipboard

Unable to install a package form a Github subdir

Open lnalborczyk opened this issue 2 years ago • 2 comments

Hi,

I have a package hosted in a sub-directory of a Github repo: https://github.com/lnalborczyk/IMSB2022/tree/master/imsb. Note that the name of the package is prefixed with "" because it is part of a quarto website and I do not want it to be rendered by quarto (maybe that is what is causing the issue below?).

When I try to install the package with remotes::install_github(repo = "lnalborczyk/IMSB2022/_imsb") or remotes::install_github(repo = "lnalborczyk/IMSB2022", subdir = "/_imsb"), I get the following error message:

Downloading GitHub repo lnalborczyk/IMSB2022@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  download from 'https://api.github.com/repos/lnalborczyk/IMSB2022/tarball/HEAD' failed

It seems the subdir argument is ignored... Any idea why?

NB: specifying the full URL with remotes::install_github(repo = "lnalborczyk/IMSB2022", subdir = "/tree/master/_imsb") results in a 404 error...

Thank you for your help!

Ladislas

lnalborczyk avatar Sep 15 '22 10:09 lnalborczyk

remotes::install_github("lnalborczyk/IMSB2022/_imsb")

works for me, so please try the latest remotes version, the dev version, and if it please fails, add more details about your system.

gaborcsardi avatar Sep 15 '22 10:09 gaborcsardi

Thank you for your prompt answer!

It works now for me too, when increasing the timeout with options(timeout = 240) before trying to install the package from Github, so it may have been a connection issue...

Thank you again for your help!

Ladislas

lnalborczyk avatar Oct 27 '22 10:10 lnalborczyk