当尝试使用导入谷歌工作表时gs_read()
函数,我收到以下错误消息:
在curl::curl_fetch_memory(url,handle=handle)中出错:对等
无法使用给定的 CA 证书对证书进行身份验证
我正在关注这个vignette http://htmlpreview.github.io/?https://raw.githubusercontent.com/jennybc/googlesheets/master/vignettes/basic-usage.html并在使用代码时出现错误:
oceania <- gap %>% gs_read(ws = "Oceania")
我发现了类似的问题Ubuntu https://stackoverflow.com/questions/23435232/twitter-peer-certificate-cannot-be-authenticated-with-given-ca-certificates and php https://stackoverflow.com/questions/15135834/php-curl-curlopt-ssl-verifypeer-ignored,但没有什么能够帮助我。
有谁知道我为什么会收到此错误以及如何修复它?
我使用的是 R 3.3.2 和 Windows 7。
我的同事也遇到了同样的问题,我偶然发现this https://www.r-bloggers.com/fixing-peer-certificate-cannot-be-authenticated/Andrew Collier 在 R-Bloggers 上发表的文章。下面的解决方案可以解决您的问题,但我不知道它是否会导致其他安全问题。
library(httr)
set_config(config(ssl_verifypeer = 0L))
更新:这将禁用 ssl 验证。https://github.com/r-lib/httr/issues/262 https://github.com/r-lib/httr/issues/262
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)