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

Build is failing at remotes::install_github() #4

Closed
tombishop1 opened this issue Aug 15, 2021 · 2 comments
Closed

Build is failing at remotes::install_github() #4

tombishop1 opened this issue Aug 15, 2021 · 2 comments

Comments

@tombishop1
Copy link
Owner

The build fails because it can't download the file from Github using remotes::install_github(). I suspect this is related to r-lib/remotes#641. This is weird, because the URL opens fine in a browser etc.

Quitting from lines 15-52 (itraxBook.Rmd) 
Error: Error: Failed to install 'unknown package' from GitHub:
  cannot open URL 'https://api.github.com/repos/tombishop1/itraxR/contents/DESCRIPTION?ref=HEAD'

Faced with the same problem locally, I set options(download.file.method = "libcurl"), whereas before it was set to "wininet". However, when I later tried the same in a new session using the default values, it worked fine, so I suspect this may have been a red-herring (see below for the output of the local run).

> remotes::install_github("tombishop1/itraxR")
Downloading GitHub repo tombishop1/itraxR@HEAD
√  checking for file 'C:\Users\tombi\AppData\Local\Temp\RtmpC8Uexh\remotes378c1ed41b25\tombishop1-itraxR-d0e0b78/DESCRIPTION' ... 
-  preparing 'itraxR': (401ms)
√  checking DESCRIPTION meta-information ... 
-  checking for LF line-endings in source and make files and shell scripts
-  checking for empty or unneeded directories
-  building 'itraxR_1.4.tar.gz'
   
Installing package into ‘C:/Users/tombi/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
* installing *source* package 'itraxR' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'itraxR'
    finding HTML links ... done
    CD166_19_S1                             html  
    itrax_correlation                       html  
    itrax_image                             html  
    itrax_import                            html  
    itrax_join                              html  
    itrax_meta                              html  
    itrax_ordination                        html  
    itrax_qspecsettings                     html  
    itrax_radiograph                        html  
    itrax_reduce                            html  
    itrax_restspectra                       html  
    itrax_section                           html  
    itrax_spectra                           html  
    multivariate_import                     html  
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (itraxR)
> getOption("download.file.method")
[1] "wininet"
@tombishop1
Copy link
Owner Author

Thinking about this, I wonder if it has something to do with the changes in 4.1.1 - there are platform specific changes to methods for download.file. I think I can pass method = in remotes::install_github(), so the answer might be to define a method here. Perhaps options(download.file.method = "libcurl") or method = "curl" is appropriate for macOS?

@tombishop1
Copy link
Owner Author

OK, it was actually a PAT thing. Seems to be sorted now.

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

1 participant