Open tomsing1 opened 2 weeks ago
Current workaround is to set my GITHUB_PAT
environmental variable manually, after the {renv} project has activated.
That allows me to install {gitcreds}:
renv::activate()
Sys.setenv("GITHUB_PAT"= "my_token")
renv::install("gitcreds") # succeeds
but I was looking for a way not to have to expose my GITHUB_PAT
.
I am probably missing something obvious? 🤔
I have been hit by this—although I don't have a minimal repo. Recently when using renv::install, I've been given a dialogue to input a PAT. This despite having set up with ssh and being able to download from github private repos fine. Would be great to be able to turn off gitcreds.
To confirm, what version of renv
are you using? The most recent CRAN release of renv
should have some fixes for usages of gitcreds
.
To confirm, what version of
renv
are you using? The most recent CRAN release ofrenv
should have some fixes for usages ofgitcreds
.
I'm seeing this on 1.0.7. If I install gitcreds the problem goes away.
https://github.com/rstudio/renv/assets/12742211/58959b4e-9bde-47bf-865b-a7e04339ce21
This despite having set up with ssh and being able to download from github private repos fine.
My guess is you need to set up the SSH agent, or something similar, so that your private keys can be loaded and used in RStudio? (Or perhaps R / renv could try do this on your behalf; I'm not sure.)
You might also want to file a separate issue; if I understand correctly, the original issue targeted for this thread was making sure that gitcreds
would work when installed; yours is something separate (use SSH keys when available when authenticating with repositories)
I have an existing {renv} project, whose lockfile includes packages installed from private repositories on github. When I (re)start R in the RStudio project folder, {renv} activates the project (as expected), but immediately tells me that {gitcreds} is not available.
The {gitcreds} package is installed in my user directory (outside the {renv} project) at
/Users/sandmann/Library/R/arm64/4.4/library/gitcreds
.But how do I manage to install it within the {renv} project? Trying the use
renv::install()
fails because of the same problem {renv} reported above - even though {gitcreds} is available from CRAN.Many thanks for advice!
SessionInfo
```r sessionInfo() R version 4.4.0 (2024-04-24) Platform: aarch64-apple-darwin20 Running under: macOS Sonoma 14.4.1 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 time zone: America/Los_Angeles tzcode source: internal attached base packages: [1] stats graphics grDevices datasets utils methods base loaded via a namespace (and not attached): [1] compiler_4.4.0 tools_4.4.0 renv_1.0.7 ```