NCEAS / recordr

Provenance tracking for R.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems running through the vignette

amoeba opened this issue · comments

I ran into two problems when I ran through the vignette just now. First,

> publishRun(rc, seq=2, quiet=F)
Publishing execution urn:uuid:ad05aa82-2414-4b56-9bec-cc697b2e6785 to urn:node:testKNB
Error in .local(...) : 
  CertificateManager functions require the PKIplus package to be installed.

I then installed PKIplus manually with install.packages("PKIplus") and re-ran publishRun:

> publishRun(rc, seq=2, quiet=F)
Publishing execution urn:uuid:ad05aa82-2414-4b56-9bec-cc697b2e6785 to urn:node:testKNB
Error in .local(recordr, ...) : 
  Please create a valid DataONE certificate before calling publish()

I'm not sure what to do now as the help message isn't giving me quite enough. I opened ~/.dataone/sessionConfig.R and I see a line reading certificate_path <- NULL. This seems like the next place to go but what do I do here?

@amoeba The dataone package uses the PKIplus package and lists it under "Suggests", as
you only need this package if you are uploading data or attempting to download data from DataONE
that requires authenticated access, so it isn't downloaded automatically. So, recordr is trying to check your X509 certificate which is required in order upload data to DataONE. You can create a certficate
by typing "cm <- CertificateManager() ; downloadCert(cm)". Once you login to CIlogon, for example with your
Google id, you click on the downloaded Java Web Start file, then go into Mac "Preferences->Security"
to approve the script, then your certificate will be downloaded to your /tmp dir. Hoy! Authentication
is going to get a lot easier with authentication tokens! PS - You don't need to change the "certificate_path" value, as the file location that the certificate is created at will be found by the
CertificateManager when publishRun() runs.

Thanks for explaining. I think other users may run into this. Maybe it would be good to cover some of this in the vignette?

@ameoba Yes, definitely. For DataONE V2, authentication tokens will be the preferred mechanism and so the dataone package should reference the DataONE docs for minting the auth token, and have an
explanation of how to use the token in the dataone/recordr packages. Thanks, I'll enter a dataone package issue for this and check in with the DataONE folks on current state of user profile / auth token
creation documentation.

Great, feel free to ping me if you need a novice to look at some wording or try installing something.

Authentication is now mentioned in the intro_recordr vignette, but this is just a redirect to
the dataone-overview vignette where authentication is explained in detail.