Creating Your GitHub Token and Civis Platform Custom Credential
In order to import private GitHub libraries into your R Notebook, you’ll first need to create a GitHub personal access token. After creating your personal access token, store it as a custom credential in Civis Platform, where you input your GitHub username in the Username field, and the generated GitHub token in the Password field.
Importing A Private Library into Your R Notebook
- Add the custom credential you created to your R notebook and start the notebook.
- In the first cell, import the devtools library into your R notebook by running the following:
library(devtools)
- In the second cell, install your private R library with your credential by running
install_github(“<organization>/<repo_name>”, auth=Sys.getenv(‘<credential-name>_PASSWORD’))
Comments
0 comments
Please sign in to leave a comment.