Kazim Ali
Kazim Ali

Reputation: 1

How to fix CertGetCertificateChain trust error CERT_TRUST_IS_UNTRUSTED_ROOT in R?

I'm using R 3.5.2 version. And 1.4.0 version for httr package.

I calling an restApi Get:

CallingRestAPI = function(url){
  call.response <- GET(url = url, authenticate(username, password , type = "ntlm"))
  return(call.response)
}

Was working fine suddenly giving this error:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  schannel: CertGetCertificateChain trust error CERT_TRUST_IS_UNTRUSTED_ROOT

Upvotes: 0

Views: 23911

Answers (2)

Feetball
Feetball

Reputation: 56

Running this fixed it for me per this post:

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

Upvotes: 2

Eli Berkow
Eli Berkow

Reputation: 2725

Update httr to the development version:

devtools::install_github('r-lib/httr')

or

remotes::install_github("r-lib/httr")

See:

Upvotes: 2

Related Questions