Skip to content

SSH External Git Install with *short* SHA Ref fail #674

Open
@muschellij2

Description

@muschellij2

SSH Installs Fine (Just for checking)

This works fine and if the ref is a tag, then it seems to work fine

remotes::install_git("git@github.com:tidyverse/stringr.git", git = "external")
#> Downloading git repo git@github.com:tidyverse/stringr.git
#> '/usr/bin/git' clone --depth 1 --no-hardlinks git@github.com:tidyverse/stringr.git /tmp/RtmpmTPyz6/file59801318d231
#> 
#>      checking for file ‘/tmp/RtmpmTPyz6/file59801318d231/DESCRIPTION’ ...  ✓  checking for file ‘/tmp/RtmpmTPyz6/file59801318d231/DESCRIPTION’ (345ms)
#>   ─  preparing ‘stringr’:
#>      checking DESCRIPTION meta-information ...  ✓  checking DESCRIPTION meta-information
#>   ─  checking for LF line-endings in source and make files and shell scripts
#>   ─  checking for empty or unneeded directories
#>   ─  building ‘stringr_1.4.0.9000.tar.gz’
#>      
#> 
#> Installing package into '/home/jupyter/.R/library'
#> (as 'lib' is unspecified)
remotes::install_git("git@github.com:tidyverse/stringr.git", 
                     ref = "stringr-0.2", git = "external")
#> Downloading git repo git@github.com:tidyverse/stringr.git
#> '/usr/bin/git' clone --depth 1 --no-hardlinks git@github.com:tidyverse/stringr.git /tmp/RtmpmTPyz6/file598033d5f100
#> '/usr/bin/git' fetch origin stringr-0.2
#> '/usr/bin/git' checkout FETCH_HEAD
#> 
#>      checking for file ‘/tmp/RtmpmTPyz6/file598033d5f100/DESCRIPTION’ ...  ✓  checking for file ‘/tmp/RtmpmTPyz6/file598033d5f100/DESCRIPTION’
#>   ─  preparing ‘stringr’:
#>      checking DESCRIPTION meta-information ...  ✓  checking DESCRIPTION meta-information
#>   ─  checking for LF line-endings in source and make files and shell scripts
#>   ─  checking for empty or unneeded directories
#>   ─  creating default NAMESPACE file
#> ─  building ‘stringr_0.2.tar.gz’
#>      
#> 
#> Installing package into '/home/jupyter/.R/library'
#> (as 'lib' is unspecified)

SHA

Using an SHA - fails. I believe this is due to depth, but unsure, still working it out. Can confirm tidyverse/stringr@dd909b7 exists.

remotes::install_git("git@github.com:tidyverse/stringr.git@dd909b7", git = "external")
#> Downloading git repo git@github.com:tidyverse/stringr.git
#> '/usr/bin/git' clone --depth 1 --no-hardlinks git@github.com:tidyverse/stringr.git /tmp/RtmpmTPyz6/file5980644511a7
#> '/usr/bin/git' fetch origin dd909b7
#> Warning in system(full, intern = TRUE, ignore.stderr = quiet): running command
#> ''/usr/bin/git' fetch origin dd909b7' had status 128
#> Error : Command failed (128)
remotes::install_git("git@github.com:tidyverse/stringr.git", ref = "dd909b7", git = "external")
#> Downloading git repo git@github.com:tidyverse/stringr.git
#> '/usr/bin/git' clone --depth 1 --no-hardlinks git@github.com:tidyverse/stringr.git /tmp/RtmpmTPyz6/file59801d9d0be2
#> '/usr/bin/git' fetch origin dd909b7
#> Warning in system(full, intern = TRUE, ignore.stderr = quiet): running command
#> ''/usr/bin/git' fetch origin dd909b7' had status 128
#> Error : Command failed (128)
/usr/bin/git --version
git version 2.20.1

Created on 2021-12-02 by the reprex package (v2.0.1)

Session info
sessioninfo::session_info()
#> ─ Session info  ──────────────────────────────────────────────────────────────
#>  hash: carousel horse, waving hand: medium-dark skin tone, transgender symbol
#> 
#>  setting  value
#>  version  R version 4.1.2 (2021-11-01)
#>  os       Debian GNU/Linux 10 (buster)
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language (EN)
#>  collate  C.UTF-8
#>  ctype    C.UTF-8
#>  tz       Etc/UTC
#>  date     2021-12-02
#>  pandoc   2.14.0.2 @ /opt/conda/bin/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  ! package     * version    date (UTC) lib source
#>    callr         3.7.0      2021-04-20 [2] CRAN (R 4.1.0)
#>    cli           3.1.0.9000 2021-10-29 [1] Github (r-lib/cli@1af3d91)
#>    crayon        1.4.2      2021-10-29 [1] CRAN (R 4.1.0)
#>    curl          4.3.2      2021-06-23 [1] CRAN (R 4.1.0)
#>    digest        0.6.28     2021-09-23 [1] CRAN (R 4.1.0)
#>    evaluate      0.14       2019-05-28 [2] CRAN (R 4.1.0)
#>    fastmap       1.1.0      2021-01-25 [2] CRAN (R 4.1.0)
#>    fs            1.5.1      2021-11-30 [1] CRAN (R 4.1.0)
#>    glue          1.5.1      2021-11-30 [1] CRAN (R 4.1.0)
#>    highr         0.9        2021-04-16 [2] CRAN (R 4.1.0)
#>    htmltools     0.5.2      2021-08-25 [1] CRAN (R 4.1.0)
#>    knitr         1.36       2021-09-29 [1] CRAN (R 4.1.0)
#>    magrittr      2.0.1      2020-11-17 [2] CRAN (R 4.1.0)
#>    pkgbuild      1.2.1      2021-11-30 [1] CRAN (R 4.1.0)
#>    prettyunits   1.1.1      2020-01-24 [2] CRAN (R 4.1.0)
#>    processx      3.5.2      2021-04-30 [2] CRAN (R 4.1.0)
#>    ps            1.6.0      2021-02-28 [2] CRAN (R 4.1.0)
#>    R6            2.5.1      2021-08-19 [1] CRAN (R 4.1.0)
#>    remotes       2.4.2      2021-12-02 [1] Github (r-lib/remotes@fcad17b)
#>    reprex        2.0.1      2021-08-05 [1] CRAN (R 4.1.0)
#>    rlang         0.4.12     2021-10-18 [1] CRAN (R 4.1.0)
#>    rmarkdown     2.11       2021-09-14 [1] CRAN (R 4.1.0)
#>    rprojroot     2.0.2      2020-11-15 [2] CRAN (R 4.1.0)
#>    rstudioapi    0.13       2020-11-12 [2] CRAN (R 4.1.0)
#>    sessioninfo   1.1.1.9000 2021-11-30 [1] Github (muschellij2/sessioninfo@6e2857d)
#>    stringi       1.7.6      2021-11-29 [1] CRAN (R 4.1.0)
#>  V stringr       1.4.0      2021-12-02 [1] xgit (git@github.com:tidyverse/stringr.git@d32c3d9) (on disk 0.2)
#>    withr         2.4.3      2021-11-30 [1] CRAN (R 4.1.0)
#>    xfun          0.28       2021-11-04 [1] CRAN (R 4.1.0)
#>    yaml          2.2.1      2020-02-01 [2] CRAN (R 4.1.0)
#> 
#>  [1] /home/jupyter/.R/library
#>  [2] /usr/local/lib/R/site-library
#>  [3] /usr/lib/R/site-library
#>  [4] /usr/lib/R/library
#> 
#>  V ── Loaded and on-disk version mismatch.
#> 
#> ──────────────────────────────────────────────────────────────────────────────

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions