Closed ugzvot closed 5 years ago
I'm going to consider it a success that renv
was able to work in this configuration without any extra changes from me :-)
I've added some documentation to the Getting Started vignette to give some hints as to how to configure renv
+ curl
to use proxy servers, though. Let me know if you think that's sufficient.
Seems good. Perhaps change the last paragraph to:
See the curl documentation on [proxies](https://ec.haxx.se/usingcurl-proxies.html) and [config files](https://ec.haxx.se/cmdline-configfile.html) for more details.
And perhaps add the example _curlrc and drop the keywords ntlm and sspi, something along the lines:
This config file works with a common proxy setup in a windows environment (authentication with ntlm and sspi):
```
--proxy "your.proxy.dns:port"
--proxy-ntlm
--proxy-user ":"
--insecure
```
In the best case it works for the user, else he has some keywords to start googling or asking his IT support.
The curl packages has the helper function curl::ie_get_proxy_for_url()
to find the proxy address. Don't know if this should be included.
I struggled mostly with the following points:
location of _curlrc. For me sys.getenv("APPDATA")
and 'sys.getenv("USERPROFILE")\Application Data'
doesn't work. In the end I had to take a look at the renv source code to get a working location. This is resolved with the added sections
The --proxy-user ":"
switch. i really disliked to store my password in text file. And i asked me how gets RStudio my credentials to download files and packages from cran / github? Found the answer on stackoverflow. I configured the proxy in a .renviron file in Sys.getenv("HOME")
.
-Then the _curlrc format first i had proxy-user = :
and ran into https://github.com/curl/curl/issues/3738#issuecomment-480379380.
As an after thought:
yeah it is definitely a success. And the problems I had, was with the missing curl, the correct curl configuration and missing knowledge about proxy authentication not in renv. renv has even the tools to help me with the missing curl. On the other side, i had a working setup for install.packages()
and remotes::install_*
.
Yesterday i was just a bit frustrated about how simple the solution is, but i wasted a lot of time to get the configuration right.
Thank you for the feedback -- it is hugely appreciated. I've updated the documentation with that example, and also altered how renv
looks for _curlrc
(since the documentation makes it clear that curl
would normally look in %APPDATA%
and the other folder as well).
Like in https://github.com/rstudio/renv/issues/64 we have an awful man in the middle Proxy using Windows logins (SSPI) and the ntlm authentication protocol. A good explanation is found in this stackoverflow answer. To make matter worse, the bundled curl is removed from our windows image.
renv::install()
fails:I found a simple solution in the end, but it was cumbersome to find all the pieces of information:
• Install curl with
renv::equip()
• Create following _curlrc inSys.getenv("HOME")
orSys.getenv("R_USER")
The double quotes are important.
:
is interpreted as separator. See https://github.com/curl/curl/issues/3738#issuecomment-480379380edit: Added console output for successful install