如何让 R 接受自签名证书 [英] How to get R to accept self signed certificates

查看:38
本文介绍了如何让 R 接受自签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码使用包 RGoogleAnaytics

require(RGoogleAnalytics)client.id <- "XX"client.secret <- "YY"令牌 <- Auth(client.id,client.secret)保存(令牌,文件=./token_file")

运行时它会进入我的浏览器并要求我登录我的帐户,其中包含我希望访问的 Google Analytics 配置文件.完成此操作后,R 提示我返回 R 并继续但是在 R 我得到错误:

SSL 证书问题:证书链中的自签名证书

我该如何解决这个问题?有没有办法强制 R 接受这样的证书?有没有办法改变页面给我的证书类型?

解决方案

使用最新版本的 devtools 之前的解决方案对我不起作用.要解决问题,请将 . 更改为 _

set_config(config(ssl_verifypeer = 0L))

我相信原因是包 devtools 的新版本从 RCurl 更改为 curl(反之亦然).

I have the following code using the Package RGoogleAnaytics

require(RGoogleAnalytics)
client.id <- "XX"
client.secret <- "YY"
token <- Auth(client.id,client.secret)
save(token,file="./token_file")

When running this it goes into my browser and asks me to login to my account which has the Google Analytics profiles i wish to access. Once this has been done R prompts me to return to R and proceed However in R I get the error:

SSL certificate problem: self signed certificate in certificate chain

How can I rectify this? Is there a way to force R to accept such certificates? Is there a way to change the type of certificate that the page gives me?

解决方案

The former solution doesn't work for me with the latest version of devtools. To solve the problem change the . for a _

set_config( config( ssl_verifypeer = 0L ) )

I beleive the reason is the the new version of of the package devtools changed from RCurl to curl (or viceversa).

这篇关于如何让 R 接受自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆