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

git_push throws authentication error #161

Open
psychelzh opened this issue Nov 16, 2021 · 1 comment
Open

git_push throws authentication error #161

psychelzh opened this issue Nov 16, 2021 · 1 comment

Comments

@psychelzh
Copy link

psychelzh commented Nov 16, 2021

I am using rstudio-server under wsl. I can successfully git push my repository in the terminal, but when I use gert::git_push() in Rstudio, it will constantly throw the following error:

gert::git_push()
#> Error in libgit2::git_remote_push: Authentication failure

Created on 2021-11-16 by the reprex package (v2.0.1)

Session info
sessioninfo::session_info()
#> Warning in system("timedatectl", intern = TRUE): running command 'timedatectl'
#> had status 1
#> ─ Session info  ──────────────────────────────────────────────────────────────
#>  hash: white medium square, woman: dark skin tone, red hair, superhero: medium-dark skin tone
#> 
#>  setting  value
#>  version  R version 4.1.2 (2021-11-01)
#>  os       Ubuntu 20.04.3 LTS
#>  system   x86_64, linux-gnu
#>  ui       X11
#>  language (EN)
#>  collate  C.UTF-8
#>  ctype    C.UTF-8
#>  tz       Asia/Shanghai
#>  date     2021-11-16
#>  pandoc   2.14.0.3 @ /usr/lib/rstudio-server/bin/pandoc/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version date (UTC) lib source
#>  askpass       1.1     2019-01-13 [1] CRAN (R 4.1.1)
#>  backports     1.3.0   2021-10-27 [1] CRAN (R 4.1.1)
#>  cli           3.1.0   2021-10-27 [1] CRAN (R 4.1.1)
#>  crayon        1.4.2   2021-10-29 [1] CRAN (R 4.1.1)
#>  credentials   1.3.1   2021-07-25 [1] CRAN (R 4.1.1)
#>  digest        0.6.28  2021-09-23 [1] CRAN (R 4.1.1)
#>  ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.1.1)
#>  evaluate      0.14    2019-05-28 [1] CRAN (R 4.1.1)
#>  fansi         0.5.0   2021-05-25 [1] CRAN (R 4.1.1)
#>  fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.1.1)
#>  fs            1.5.0   2020-07-31 [1] CRAN (R 4.1.1)
#>  gert          1.4.3   2021-11-10 [1] CRAN (R 4.1.2)
#>  glue          1.5.0   2021-11-07 [1] CRAN (R 4.1.2)
#>  highr         0.9     2021-04-16 [1] CRAN (R 4.1.1)
#>  htmltools     0.5.2   2021-08-25 [1] CRAN (R 4.1.1)
#>  knitr         1.36    2021-09-29 [1] CRAN (R 4.1.1)
#>  lifecycle     1.0.1   2021-09-24 [1] CRAN (R 4.1.1)
#>  magrittr      2.0.1   2020-11-17 [1] CRAN (R 4.1.1)
#>  openssl       1.4.5   2021-09-02 [1] CRAN (R 4.1.1)
#>  pillar        1.6.4   2021-10-18 [1] CRAN (R 4.1.1)
#>  pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.1.1)
#>  purrr         0.3.4   2020-04-17 [1] CRAN (R 4.1.1)
#>  R.cache       0.15.0  2021-04-30 [1] CRAN (R 4.1.1)
#>  R.methodsS3   1.8.1   2020-08-26 [1] CRAN (R 4.1.1)
#>  R.oo          1.24.0  2020-08-26 [1] CRAN (R 4.1.1)
#>  R.utils       2.11.0  2021-09-26 [1] CRAN (R 4.1.1)
#>  reprex        2.0.1   2021-08-05 [1] CRAN (R 4.1.1)
#>  rlang         0.4.12  2021-10-18 [1] CRAN (R 4.1.1)
#>  rmarkdown     2.11    2021-09-14 [1] CRAN (R 4.1.1)
#>  rstudioapi    0.13    2020-11-12 [1] CRAN (R 4.1.1)
#>  sessioninfo   1.2.1   2021-11-02 [1] CRAN (R 4.1.1)
#>  stringi       1.7.5   2021-10-04 [1] CRAN (R 4.1.1)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.1.1)
#>  styler        1.6.2   2021-09-23 [1] CRAN (R 4.1.1)
#>  sys           3.4     2020-07-23 [1] CRAN (R 4.1.1)
#>  tibble        3.1.6   2021-11-07 [1] CRAN (R 4.1.2)
#>  utf8          1.2.2   2021-07-24 [1] CRAN (R 4.1.1)
#>  vctrs         0.3.8   2021-04-29 [1] CRAN (R 4.1.1)
#>  withr         2.4.2   2021-04-18 [1] CRAN (R 4.1.1)
#>  xfun          0.28    2021-11-04 [1] CRAN (R 4.1.1)
#>  yaml          2.2.1   2020-02-01 [1] CRAN (R 4.1.1)
#> 
#>  [1] /home/liang/R/x86_64-pc-linux-gnu-library/4.1
#>  [2] /usr/local/lib/R/site-library
#>  [3] /usr/lib/R/site-library
#>  [4] /usr/lib/R/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────

More message is like this:

#> Unable to find ssh-agent (SSH_AUTH_SOCK undefined)
#> Trying to authenticate 'git' using provided ssh-key...
#> Failed to authenticate over SSH. You either need to provide a key or setup ssh-agent
@MeterDS2021
Copy link

I am having the same issue. Working on RStudio Workbench, I can use any git command from the terminal, but not using gert:: in RStudio:

> gert::git_push()
Unable to find ssh-agent (SSH_AUTH_SOCK undefined)
Trying to authenticate 'git' using provided ssh-key...
Failed to authenticate over SSH. You either need to provide a key or setup ssh-agent
Error in libgit2::git_remote_push : Authentication failure

Even if I point gert::git_push() to my ssh-key using the ssh_key argument it does not work. Any ideas?

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

2 participants