我正试图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
Run Code Online (Sandbox Code Playgroud)
显然,我们有一些证书服务器用我们自己的公司SSL证书替换SSL证书(通过访问https://github.com并检查证书确认).
无论如何,只是想知道是否有办法忽略该证书错误并继续安装?
jdh*_*son 27
处理问题的一种方法是将其设置CURLOPT_SSL_VERIFYPEER为false.此选项确定curl是否验证对等证书的真实性.值为1表示卷曲验证; 0(零)表示它没有.
http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html
相关选项需要传递给RCurl.在RCurl将CURLOPT_被删除字母皆为小写和下划线更改为 ..
set_config( config( ssl.verifypeer = 0L ) )
Run Code Online (Sandbox Code Playgroud)
会RCurl在使用时通过相关选项httr.
更新:
的httr,因为这答案被写入已经从RCurl移动作为底层的依赖于curl包.cURL选项现在使用下划线指定,因此上面将是:
set_config( config( ssl_verifypeer = 0L ) )
Run Code Online (Sandbox Code Playgroud)
在当前版本中httr.
| 归档时间: |
|
| 查看次数: |
9632 次 |
| 最近记录: |