r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
330 stars 152 forks source link

install_github error: Failed to install packages from GitHub #718

Closed duohongrui closed 2 years ago

duohongrui commented 2 years ago

Hi, I wanted to install my own package on github by devtools::install_github("duohongrui/simmethods"), but an error occurred.

Using github PAT from envvar GITHUB_TOKEN
Downloading GitHub repo duohongrui/simmethods@HEAD
Error: Failed to install 'simmethods' from GitHub:
  cannot open URL 'https://gitlab.com/api/v4/projects/sysbiobig%2Fsparsim/repository/commits/HEAD'

Why gitlab is in the URL? And I indeed used the devtools::install_github function. Anyway, the simutils package I wrote can be successfully installed by devtools::install_github("duohongrui/simutils") command. Environment:

R version 4.2.0 (2022-04-22)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.3

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_2.4.4.9000 usethis_2.1.6      

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9        rstudioapi_0.13   magrittr_2.0.3    pkgload_1.3.0     xtable_1.8-4      R6_2.5.1         
 [7] rlang_1.0.4       fastmap_1.1.0     urlchecker_1.0.1  stringr_1.4.0     tools_4.2.0       pkgbuild_1.3.1   
[13] sessioninfo_1.2.2 miniUI_0.1.1.1    cli_3.3.0         remotes_2.4.2     htmltools_0.5.3   ellipsis_0.3.2   
[19] digest_0.6.29     lifecycle_1.0.1   crayon_1.5.1      processx_3.7.0    shiny_1.7.2       purrr_0.3.4      
[25] callr_3.7.1       later_1.3.0       htmlwidgets_1.5.4 profvis_0.3.7     fs_1.5.2          promises_1.2.0.1 
[31] ps_1.7.1          curl_4.3.2        memoise_2.0.1     glue_1.6.2        cachem_1.0.6      mime_0.12        
[37] stringi_1.7.8     compiler_4.2.0    prettyunits_1.1.1 httpuv_1.6.5  

I am very confused by that. Could you please help me solve this problem? Thanks very much! Best.

gaborcsardi commented 2 years ago

Why gitlab is in the URL?

Probably because some downstream dependency is from gitlab.

duohongrui commented 2 years ago

OK, I will try again after correcting this. Thanks very much!

duohongrui commented 2 years ago

Hi, @gaborcsardi. It is exactly the problem that you said and I can successfully install my package from github. Thanks very much! Best.