I now frequently use GitHub actions to deploy websites on gh-pages. One way to do so requires to use a ssh key (the full procedure is well explained, inter alia, in the README of peaceiris/actions-gh-pages). As I am used to work with the Terminal, when I need such a key, I use the following command line:
| |
which generates two files:
- gh-pages.pub
- gh-pages that contains the private one.
For some reasons, I was interested in replicating this behavior with . Fortunately, the package
openssl includes rsa_keygen()
and write_pem() that makes this super easy:
| |
So now, I can gather this step in a handy function that I can append to .Rprofile!
| |
That’s all folks 🎉!