23

I am trying to install a package from github in R, however I am getting the following error:

> install_github("jmp75/rClr", build_vignettes=TRUE)
Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) : 
Peer certificate cannot be authenticated with given CA certificates

I have set the RCurl options as such:

options(RCurlOptions = c(getOption("RCurlOptions"),   ssl.verifypeer = FALSE,  ssl.verifyhost = FALSE ) )

After checking the setting:

getOption("RCurlOptions")

we see....

$cainfo
[1] "C:/_CODE/R/Library/RCurl/etc/ca-bundle.crt"

$ssl.verifypeer
[1] FALSE

$ssl.verifyhost
[1] FALSE

Still I get the error:

Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) : 
Peer certificate cannot be authenticated with given CA certificates

any clues

screig
  • 607
  • 1
  • 6
  • 19

1 Answers1

66

Does this work? I had to change this bit of code recently from ssl.verifypeer to ssl_verifypeer

library(httr)
set_config(config(ssl_verifypeer = 0L))

see here devtools::install_github() - Ignore SSL cert verification failure

Community
  • 1
  • 1
Tom Liptrot
  • 2,273
  • 21
  • 23
  • 2
    I don't think the `library(RCurl)` line is needed? For anyone else who runs into this problem often: I added a line to my .Rprofile file: `.fixdevtools <- function() { httr::set_config( httr::config( ssl_verifypeer = 0L ) ) }` Now I just need to type `.fixdevtools()` every time instead of coming back to google and finding this answer :) – DeanAttali Sep 24 '16 at 00:48