Skip to content

Using Private Packages

If you want to use unregistered packages that are in private repositories on GitHub, there are two options to specify the required credentials: (1) use a GitHub personal access token and (2) use a GitHub SSH key. The first method, using a personal access token, is the easiest to use and also our recommended approach. In order to use SSH keys, you will need to have created your cluster with an EC2 key pair and will need to SSH into the cluster. We will describe both methods.

Using Personal Access Tokens

Please follow the instructions here to create a token. When starting a session, you must provide this token as the environment variable BANYAN_GITHUB_TOKEN in the following format, replacing <username> and <personal_access_token>:

https://<username>:<personal_access_token>@github.com

This value will get cached locally in the file ~/.banyan/banyanconfig.toml, and thus you do not need to specify this more than once, unless the file is cleared.

Access control risk

Note that this value does get cached globally on the cluster, unencrypted in a file. If multiple users within an organization have access to the cluster, the token can be accessed by and will be used by all users who have access to the cluster. If this is an issue, please be careful to assign cluster access appropriately.

Using SSH Keys

To use SSH keys, for security reasons, you will need to SSH into the cluster to create the SSH public-private key pair and add it to your GitHub account. Please follow the instructions here to generate a new SSH key and add it to your GitHub account. When prompted for a passphrase, please type "Enter" to bypass this.

Then, when starting a session, provide the path on the cluster to the private SSH key file as the environment variable BANYAN_SSH_KEY_PATH. For example, export BANYAN_SSH_KEY_PATH=~/.ssh/id_ed25519. This value will get cached locally in the file ~/.banyan/banyanconfig.toml, and thus you do not need to specify this more than once, unless the file is cleared.

Access control risk

Since SSH keys are used globally on the cluster, specified keys will be used by all users who have access to the cluster to use private packages in their software environments. If this is an issue, please be careful to assign cluster access appropriately.