SSL-certificates installing packages in R 4.2

Viewed 240

I have a problem with a custom local CRAN-mirror (jfrog) under windows on a machine without access to the internet:

  • in R 4.1.2, I have no problems accessing the mirror via https,
  • in R 4.2.0, I get errors that the index in PACKAGES can not be accessed via https.

After browsing the web and SO, I saw some more problems alike but none quite the same (see, e.g. here), I got around this issue by adding to my .Rprofile

options(repos = c(CRAN = "internalrepo"),
     download.file.method = "curl",
     download.file.extra = "-k -L")

to bypass checking SSL-certificates.

This works for me on a computer with access to the local network only, but it seems a bad idea on computers connected to the internet using a custom CRAN mirror.

Also, I would like to understand the cause of the problem. Did something change in the way that R handles SSL-certificates or did we break something in the installation of R 4.2?

sessionInfo() and Sys.getenv() do not show much difference between R 4.1.2 and R 4.2.0 but in R 4.2.0, I saw that there is an additional environment variable CURL_CA_BUNDLE that points to the R installation directory /etc/curl-ca-bundle.crt

1 Answers

Just letting you know @clemenskuehn we have the same thing - local mirror working fine in 4.1.2 over HTTPS on some restricted data systems that aren't allowed internet access, then suddenly we update to 4.2.1 on our windows & linux boxes, and the windows machines only (linux works fine) aren't able to use the local mirror anymore,

"warning: unable to access index for repository https://mirror.oursite.com/cran/src/contrib:

cannot open URL 'https://mirror.oursite.com/cran/src/contrib/PACKAGES"

so it's not just you. Did you open a tracker with the R developers? Your workaround works for us so we might put it into production as a stopgap but it definitely be good if we didn't have to allow insecure connections, even though these systems can't get outbound access anyway.

Related