12

When I am trying to publish my work in R Pubs I am getting an error:

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
Calls: rpubsUpload ... <Anonymous> -> .postForm -> .Call -> <Anonymous> -> fun
Execution halted

Is there anyway to resolve it ?

llrs
  • 3,308
  • 35
  • 68
Panchacookie
  • 427
  • 1
  • 6
  • 22

4 Answers4

16

Add an .Rprofile file in the directory you are sending from and place this line:

options(rpubs.upload.method = "internal")

in the .Rprofile or RProfile.site files.

Richie Cotton
  • 118,240
  • 47
  • 247
  • 360
Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
  • 1
    Really you just need to run that line. The .Rprofile makes it so you don't have to remember to do that in the future. But note that if you take this route you have to either run that line or restart R for the .Rprofile to take effect. – Dason Mar 20 '14 at 19:49
  • I'm not sure on this. I almost think the .Rprofile is necessary but can't remember. It was a Windows problem I believe. But the best way is for the user to try it and see. I found the answer on RStudio's help list serve a while back so this should be searchable. – Tyler Rinker Mar 20 '14 at 20:00
6

I had the similar problem. I copied the options(rpubs.upload.method = "internal") as described by @Tyler Rinker at the end of the .RProfile. The .RProfile file was located in \library\base\R folder of installation directory.

umair durrani
  • 5,597
  • 8
  • 45
  • 85
  • Very intuitive explanaition! Thanks a lot! – And_R Jun 08 '14 at 14:11
  • You can make a .Rprofile where ever you want. This may or may not be something the user wants to set globally. By making your own .Rprofile in that directory the change is local only (which may not be desired). – Tyler Rinker Jun 22 '14 at 22:08
2

I had also the same error message.
I found solution for my problem on Rstudio support page.

In short, I added:

options(rpubs.upload.method = "internal")
options(RCurlOptions = list(verbose = FALSE, capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE))

to R_HOME/etc/Rprofile.site.
And do not forget to change permissions for this file.

My system:

sysname    release  machine 
"Windows"  "7 x64"  "x86-64" 

R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
AndriusZ
  • 822
  • 1
  • 10
  • 18
1

You need to have an account in Rpubs. Also i have copied options(rpubs.upload.method = "internal") in .RProfile as suggested above and after doing that i just ran my .Rmd file and then published and it works fine.