Lukas Schneiderbauer
2025-Sep-27 06:50 UTC
[R] `install.packages()` and https proxy with R 4.5
Hi all, I work from a Windows 11 environment behind a firewall, and I require proxy settings to reach the (private) R package repository I work with. Using R 4.4 I used to set the environment variable "https_proxy" which led to e.g. "install.packages()" to work just fine. I recently upgraded vom R version 4.4.2 to 4.5.1, and I find that the proxy settings seem to be not respected anymore: I get an HTTP 401 error when using `install.packages()`, while installing packages with the package {pak} seems to work just fine. Switching the download method via the install.packages argument `method` to "curl" also seems to do the trick (although that seems to introduce other problems). Could it be that the default method (libcurl as far as I know) lost the ability to respect the "https_proxy" environment variable? I find the docs of `install.packages()` and `download.file()` still suggest that this should be working. It seems to be that this is a bug in 4.5.1 but I wanted this mailing list's opinion before opening a ticket or taking similar actions. Best, Lukas [[alternative HTML version deleted]]
On Sun, Sep 28, 2025 at 10:45?AM Lukas Schneiderbauer <lukas.schneiderbauer at gmail.com> wrote:> > Hi all, > > I work from a Windows 11 environment behind a firewall, and I require proxy > settings to reach the (private) R package repository I work with. > Using R 4.4 I used to set the environment variable "https_proxy" which led > to e.g. "install.packages()" to work just fine.Maybe also try some of the other variables mentioned in https://curl.se/libcurl/c/libcurl-env.html
Jan van der Laan
2025-Oct-02 06:26 UTC
[R] `install.packages()` and https proxy with R 4.5
On 30-09-2025 17:49, Jeroen Ooms wrote:> On Sun, Sep 28, 2025 at 10:45?AM Lukas Schneiderbauer > <lukas.schneiderbauer at gmail.com> wrote: >> >> Hi all, >> >> I work from a Windows 11 environment behind a firewall, and I require proxy >> settings to reach the (private) R package repository I work with. >> Using R 4.4 I used to set the environment variable "https_proxy" which led >> to e.g. "install.packages()" to work just fine. > > > Maybe also try some of the other variables mentioned in > https://curl.se/libcurl/c/libcurl-env.htmlThat documentation mentions that 'http_proxy' is used for 'https://' addresses. Is that variable also set? I could also be that the proxy requires authentication with wininet this is often automatically done (I believe that was de default before R4.5). However, that doesn't explain why `method="curl"` would work. In that case you could try to set the proxy to `http_proxy=":@yourproxy"`. HTH, Jan> > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide https://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.