2

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?

  • This may help - http://stackoverflow.com/questions/9916283/twitter-roauth-and-windows-register-ok-but-certificate-verify-failed - and you can always [add them to your local system's cert store](http://gagravarr.org/writing/openssl-certs/others.shtml). – hrbrmstr Mar 30 '15 at 11:39
  • @hrbrmstr I tried the solution suggested, However, the http://stackoverflow.com/questions/9916283/twitter-roauth-and-windows-register-ok-but-certificate-verify-failed cant be applied to auth. I am unable to perform the same action using Oauth also. – abhishek madhavan Mar 31 '15 at 04:03

2 Answers2

0

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).

FoFaiFo
  • 54
  • 6
-1

Found this quick fix

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

disables certificate verification and hence allows me to proceed.