gpt4 book ai didi

r - devtools::install_github() - 忽略 SSL 证书验证失败

转载 作者:行者123 更新时间:2023-12-03 13:27:54 26 4
gpt4 key购买 nike

我正在尝试获取 devtools::install_github()在 Windows 7 上工作在我的公司代理后面。

到目前为止,我必须执行以下操作:

> library(httr)
> library(devtools)
> set_config(use_proxy("123.123.123.123",8080))
> devtools::install_github("rstudio/ggvis")

Installing github repo ggvis/master from rstudio
Downloading master.zip from https://github.com/rstudio/ggvis/archive/master.zip
Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

显然,我们有某种证书服务器用我们自己的公司 SSL 证书替换 SSL 证书(通过转到 https://github.com 并检查证书来确认)。

无论如何,只是想知道是否有办法忽略该证书错误并继续安装?

最佳答案

解决问题的一种方法是设置 CURLOPT_SSL_VERIFYPEER为假。此选项确定 curl 是否验证对等方证书的真实性。值为 1 表示 curl 验证; 0(零)表示没有。
http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html

相关选项需要传给RCurl .在 RCurl CURLOPT_去掉字母都是小写,下划线改为. .

set_config( config( ssl.verifypeer = 0L ) )

将相关选项传递给 RCurl使用 httr 时.

更新:
httr由于编写了此答案,因此已将 RCurl 作为潜在依赖项转移到 curl包裹。现在指定了 cURL 选项
带下划线,所以上面是:
set_config( config( ssl_verifypeer = 0L ) )

httr 的当前版本中.

关于r - devtools::install_github() - 忽略 SSL 证书验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24793863/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com