Creating Your GitHub Token and Civis Platform Custom Credential
In order to import private GitHub libraries into your 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 token in the Password field.
Importing A Private Library into Your Python Notebook
- Add the custom credential you created to your notebook and start the notebook.
- In the first cell, use pip install with your private repo URL and the GitHub credential you stored in step one to install your private library, as shown below.
!pip install git+https://$<credential-name>_PASSWORD@github.com/<your-organization>/<your-repo>.git@<desired-branch> >> /dev/null
- In the next cell, import your private library!
Comments
0 comments
Please sign in to leave a comment.