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

gitcreds_fill() inconsistent #34

Closed
tsahota opened this issue Jul 8, 2021 · 4 comments
Closed

gitcreds_fill() inconsistent #34

tsahota opened this issue Jul 8, 2021 · 4 comments
Labels
bug an unexpected problem or unintended behavior reprex needs a minimal reproducible example

Comments

@tsahota
Copy link

tsahota commented Jul 8, 2021

gitcreds::gitcreds_fill(list(url="https://impossible.com"))

[1] "protocol=dummy" "host=dummy" "username=dummy" "password=dummy get"

gitcreds::gitcreds_fill(list(url="https://impossible.com"))

Error in new_git_error("git_error", args = args, stdout = out, status = attr(out, : System git failed:

gitcreds::gitcreds_fill(list(url="https://impossible.com"))

[1] "protocol=dummy" "host=dummy" "username=dummy" "password=dummy get"

gitcreds::gitcreds_fill(list(url="https://impossible.com"))

Error in new_git_error("git_error", args = args, stdout = out, status = attr(out, : System git failed:

I have traced the problem back to inconsistent results coming from the system2() command in git_run(). Some times it's blank and sometimes its the protocol=dummy:

$ 'git' -c credential.helper="! echo protocol=dummy;echo host=dummy;echo username=dummy;echo password=dummy" credential fill 2> '/tmp/RtmpdAswNP/gitcreds-stderr-52cf16a5050a' < '/tmp/RtmpdAswNP/gitcreds-stdin-52cfb48c91f'
$ 'git' -c credential.helper="! echo protocol=dummy;echo host=dummy;echo username=dummy;echo password=dummy" credential fill 2> '/tmp/RtmpdAswNP/gitcreds-stderr-52cf16a5050a' < '/tmp/RtmpdAswNP/gitcreds-stdin-52cfb48c91f'
host=dummy
username=dummy
password=dummy get
$ 'git' -c credential.helper="! echo protocol=dummy;echo host=dummy;echo username=dummy;echo password=dummy" credential fill 2> '/tmp/RtmpdAswNP/gitcreds-stderr-52cf16a5050a' < '/tmp/RtmpdAswNP/gitcreds-stdin-52cfb48c91f'
host=dummy
username=dummy
password=dummy get
$ 'git' -c credential.helper="! echo protocol=dummy;echo host=dummy;echo username=dummy;echo password=dummy" credential fill 2> '/tmp/RtmpdAswNP/gitcreds-stderr-52cf16a5050a' < '/tmp/RtmpdAswNP/gitcreds-stdin-52cfb48c91f'

Any ideas of what might be causing this?

Thanks,

Tarj.

@gaborcsardi
Copy link
Member

Can you show sessionInfo() and sessioninfo::session_info()?

@tsahota
Copy link
Author

tsahota commented Jul 9, 2021

Thanks!

> sessionInfo()
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS/LAPACK: /opt/intel/compilers_and_libraries_2020.0.166/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_4.0.3 gitcreds_0.1.1 tools_4.0.3    yaml_2.2.1 
sessioninfo::session_info()
─ Session info ────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.3 (2020-10-10)
 os       Ubuntu 18.04.5 LTS          
 system   x86_64, linux-gnu           
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       America/New_York            
 date     2021-07-09                  

─ Packages ────────────────────────────────────────────────────────────
 package     * version date       lib source        
 assertthat    0.2.1   2019-03-21 [2] CRAN (R 4.0.3)
 cli           2.2.0   2020-11-20 [2] CRAN (R 4.0.3)
 crayon        1.3.4   2017-09-16 [2] CRAN (R 4.0.3)
 fansi         0.4.1   2020-01-08 [2] CRAN (R 4.0.3)
 gitcreds      0.1.1   2020-12-04 [2] CRAN (R 4.0.3)
 glue          1.4.2   2020-08-27 [2] CRAN (R 4.0.3)
 rstudioapi    0.13    2020-11-12 [2] CRAN (R 4.0.3)
 sessioninfo   1.1.1   2018-11-05 [2] CRAN (R 4.0.3)
 withr         2.3.0   2020-09-22 [2] CRAN (R 4.0.3)
 yaml          2.2.1   2020-02-01 [2] CRAN (R 4.0.3)

[1] /data/home/tarjinde/R/x86_64-pc-linux-gnu-library/4.0
[2] /opt/rpkgs/4.0
[3] /opt/R/4.0.3/lib/R/library

Just in case, here's the git version

> system("git --version")
git version 2.17.1

@gaborcsardi gaborcsardi added bug an unexpected problem or unintended behavior reprex needs a minimal reproducible example labels Jul 9, 2021
@gaborcsardi
Copy link
Member

Do you still have this issue?

@gaborcsardi
Copy link
Member

I am going to close this now, as I don't have a way to reproduce it. Please reopen it if you still have issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior reprex needs a minimal reproducible example
Projects
None yet
Development

No branches or pull requests

2 participants