How to configure keys with a secure Hadley package

I would like to use the Hadley Wickam package securefrom GitHub.

The usage example does not explicitly indicate how to create the keys and where to store them, and I'm confusing something (maybe more than one).

I installed the package

# install.packages("devtools")
devtools::install_github("s-u/PKI") # needed for bug fixes not currently on CRAN
devtools::install_github("hadley/secure")

configure the folder vault:

dir.create("vault")

Then the next step is to add the user / key:

secure::add_user("hackr", local_key())

and, of course, if I literally ran this last line, as it says

Error: no keys matching id_rsa

Because I do not have a key. So, I used PuttyGen to create the RSA key / key pair.

I saved them on my desktop and tried to put the full path to the command above:

secure::add_user("hackr", local_key("C:/Users/hackr/Desktop/r_public_key"))

But this did not work:

Error: No Key Matches

Then I tried to save the public key in the store and do:

secure::add_user("hackr", local_key("r_public_key"))

. ( ), .

, C:\Users\hackr\.ssh, .

, - ( Windows , ?) / , PuttyGen SSH (?).

+4
2

, local_key , ~/.ssh( ). , id_rsa.pub, , , local_key.

, , "Hack-R "

+4

, Hadley local_key() , ~/.ssh, , id_rsa.pub. , .

1

https://help.github.com/articles/generating-an-ssh-key/
. .

: ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

. .

: ssh-add ~/.ssh/id_rsa .

2

secure::add_user("hackr", local_key()) .

0

Source: https://habr.com/ru/post/1654817/


All Articles