ropensci / git2r

R bindings to the libgit2 library
https://docs.ropensci.org/git2r
GNU General Public License v2.0
216 stars 58 forks source link

Error in git2r::repository(local_repo): Unable to open repository at 'path' #462

Closed chuxinyuan closed 10 months ago

chuxinyuan commented 10 months ago

Problem description

On the server, I cloned a repository from gitlab using the git clone command and placed it in the /srv directory, but I can't open the repository through rstudio server.

local_repo = "/srv/xmin"
dir(local_repo)
#> [1] "config.yaml"  "content"      "layouts"      "LICENSE.md"   "netlify.toml"
#> [6] "R"            "static"       "themes"       "xmin.Rproj"  
local_repo = git2r::repository(local_repo)
#> Error in git2r::repository(local_repo) : 
#>  Unable to open repository at 'path'

Session Info

R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=zh_CN.UTF-8       LC_NUMERIC=C               LC_TIME=zh_CN.UTF-8       
 [4] LC_COLLATE=zh_CN.UTF-8     LC_MONETARY=zh_CN.UTF-8    LC_MESSAGES=zh_CN.UTF-8   
 [7] LC_PAPER=zh_CN.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=zh_CN.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] git2r_0.32.0         RSQLite_2.3.0        shinyjs_2.1.0        shinyauthr_1.0.0    
[5] shinydashboard_0.7.2 shiny_1.7.2         

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.9       rstudioapi_0.14  magrittr_2.0.3   bit_4.0.5       
 [5] xtable_1.8-4     R6_2.5.1         rlang_1.1.1      fastmap_1.1.0   
 [9] blob_1.2.3       tools_4.2.2      xfun_0.33        cli_3.6.1       
[13] DBI_1.1.3        htmltools_0.5.3  ellipsis_0.3.2   bit64_4.0.5     
[17] digest_0.6.33    lifecycle_1.0.3  later_1.3.0      vctrs_0.6.4     
[21] promises_1.2.0.1 cachem_1.0.6     memoise_2.0.1    mime_0.12       
[25] compiler_4.2.2   httpuv_1.6.6