You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am coming from here. I have observed an extremely annoying issue in corporate environments (Windows 11):
if you are using options(download.file.method = "auto") there is no chance that you will be able to install a package directly from GitHub,
For instance, devtools::install_github("hrbrmstr/streamgraph will fail
Downloading GitHub repo hrbrmstr/streamgraph@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
cannot open URL 'https://api.github.com/repos/hrbrmstr/streamgraph/tarball/HEAD'
If you use remotes::install_git("hrbrmstr/streamgraph") you get
remotes::install_git("hrbrmstr/streamgraph")
Error: Failed to install 'unknown package' from Git:
Command failed (128)
In addition: Warning message:
In system(full, intern = TRUE, ignore.stderr = quiet) :
running command '"C:\PROGRA~1\Git\cmd\git.exe" ls-remote hrbrmstr/streamgraph ' had status 128
If now you run options(download.file.method = "wininet")
remotes::install_git() fails
Error: Failed to install 'unknown package' from Git:
Command failed (128)
In addition: Warning message:
In system(full, intern = TRUE, ignore.stderr = quiet) :
running command '"C:\PROGRA~1\Git\cmd\git.exe" ls-remote hrbrmstr/streamgraph ' had status 128
but....
2. devtools::install_github("hrbrmstr/streamgraph") is successful!!
Downloading GitHub repo hrbrmstr/streamgraph@HEAD
── R CMD build ────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file 'C:\Users\ubs008\AppData\Local\Temp\RtmpCctAnf\remotes700458d053\hrbrmstr-streamgraph-76f7173/DESCRIPTION' (1.3s)
─ preparing 'streamgraph': (1s)
✔ checking DESCRIPTION meta-information
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'streamgraph_0.9.0.tar.gz'
* installing *source* package 'streamgraph' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (streamgraph)```
The text was updated successfully, but these errors were encountered:
Yes, I can see that this is annoying, but what can remotes do to improve this? remotes::install_git() uses command line git, so if that doesn't work, I am not sure what we can do.
Btw. you can also try pak::pkg_install("git::https://..."), which might work better, or worse.
remotes::install_git() uses command line git, or the git2r package. devtools::install_github() and remotes::install_github() (which is the same, effectively) use the GitHub API through HTTP.
I am coming from here. I have observed an extremely annoying issue in corporate environments (Windows 11):
if you are using
options(download.file.method = "auto")
there is no chance that you will be able to install a package directly from GitHub,For instance,
devtools::install_github("hrbrmstr/streamgraph
will failIf you use
remotes::install_git("hrbrmstr/streamgraph")
you getIf now you run
options(download.file.method = "wininet")
but....
2.
devtools::install_github("hrbrmstr/streamgraph")
is successful!!The text was updated successfully, but these errors were encountered: