Closed DanChaltiel closed 10 months ago
Can you download that file?
download.file("https://api.github.com/repos/DanChaltiel/EDCimport/tarball/HEAD", tempfile())
Yes, I can download it but there indeed seems to be a problem here.
Using 7zip, I can uncompress the .gz
but I cannot open the .tar
. Same when I download from Chrome.
If I download any other repo tarball, there is no problem.
This may be a problem on the GitHub side, but my google search yielded no good results about it. If this is beyond the scope of {remotes}, would you have any idea about how I could debug this? If a test is easy to implement, maybe a custom error message in remotes would be interesting to add (but that may be a corner case).
Try setting the TAR
env var to internal
.
This looks similar to the problem I have with remotes specified in the DESCRIPTION of my pfm package:
https://app.travis-ci.com/github/jranke/pfm/builds/257655186
Somehow download.file
as called from within remotes fails for these github api urls in these cases.
On my local Debian system, running remotes::install_deps(".")
or remotes::install_deps(".", dependencies = TRUE)
is fine, I am wondering why it does not succeed on Travis.
I had downloading issue recently with install_github()
also.
remotes::install_github('satijalab/seurat-wrappers')
Downloading GitHub repo satijalab/seurat-wrappers@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/satijalab/seurat-wrappers/tarball/HEAD' failed
I came across a stack overflow thread and changing the timeout to a larger number, options(timeout=9999999)
, solved my problem.
Cross-posting https://github.com/r-lib/remotes/issues/706#issuecomment-1510469378 here in case it helps.
I am closing this now, but please reopen with more information if you still have this issue.
Sorry, I forgot this issue was open.
This was actually a very weird firewall/proxy problem.
In fact, my package repository contains some password-protected archives that are needed for some tests. My office firewall does not allow these files for security reasons.
What I didn't know was possible, is that the tarball would download fine until the password-protected archives were detected, which caused the download to stop unexpectedly, leaving the file incomplete.
As the archives are only used for tests, adding an export-ignore
line in a .gitattributes
file solved my problem.
This issue is probably not worth fixing from inside remotes
, but you could address this specific case with a specific error message.
Hi,
I'm trying to install my package from GitHub.
The package is up to date on GitHub and installs with no problem from RStudio and using
install.packages("myfile.tar.gz", repos = NULL, type="source")
.For a (hopefully) reproducible example, you can try
remotes::install_github("DanChaltiel/EDCimport")
, and you can verify it by cloning https://github.com/DanChaltiel/EDCimport and installing it from RStudio.I'm using Windows 10 and the default
options("download.file.method"")
was"wininet"
but I tried them all:Also, while they point to the exact same function, I get different results with
devtools::install_github()
:Created on 2022-11-07 with reprex v2.0.2
Note that I can install other packages from GitHub with no problem.