rstudio / renv

renv: Project environments for R.
https://rstudio.github.io/renv/
MIT License
1.02k stars 155 forks source link

Error installing and or restoring DevOps package #1725

Open GreyMerchant opened 1 year ago

GreyMerchant commented 1 year ago

Hello,

I have looked at the other Azure DevOps issues (https://github.com/rstudio/renv/issues?q=DevOps) and I am still unable to resolve my specific issue. Most of the other threads don't show exactly how people were able to resolve their problem.

So here is what I have at the moment. In my renv.lock file the entry gets generated for our internal package like the below.


"mypackage": { 

"Package": "mypackage", 

"Version": "0.1.0", 

"Source": "Git", 

"RemoteType": "git2r", 

"RemoteUrl": "https://<username>:<password>@<url>", 

"RemoteRef": "dev", 

"RemoteSha": "<hash>", 

"Hash": "<hash>", 

"Requirements": [ 

"data.table", 

"magrittr", 

"purrr" 

] 

}, 

Originally, this didn't install as it couldn't authenticate. I added the and values directly and it was able to authenticate through standard HTTPS setup as one of the two general ways to do setup via Azure DevOps.

I want to know how I can set this up to work with SSH? SSH would mean that I can do this without explicitly sharing credentials in the url which would be a lot safer and more ideal. Even though the system I am working from has SSH setup the docker build fails for SSH. I, of course, would need this to work in a pipeline finally as well.

I am not sure how best to find a workaround. My main goal is to keep all our packages in the renv.lock to simplify installation while doing it in a way where we do not expose credentials unnecessarily. From what I understand the .lock file cannot take variables and I am not sure in what other way credentials can be made available for it. The R version is 4.2.2 and the renv version is 1.7.0 for additional context. This is getting installed on a Linux system.

Any assistance would be greatly appreciated. Please let me know if you require additional information.

GreyMerchant commented 1 year ago

Any help on this please?

kevinushey commented 12 months ago

https://github.com/rstudio/renv/issues/1751 was recently resolved -- does it provide any help in your case?