Github#

Github SSH secrets will give you access to a private github repo within the runtime environment.

First, see the instructions here to add a private key to your Github account. Make sure your ssh key does not have a password or the git clone will fail in the execution environment.

Then, create a git-ssh secret using the SSH key you just attached to your Github account:

mcli create secret git-ssh ~/.ssh/my_id_rsa

This secret will set the GIT_SSH_COMMAND environment variable in your execution environment so that git will use your ssh key by default. See the Github integration page for details on how to easily clone public or private Github repos.

Note

Because the git-ssh secret creates an environment variable for you, only one such secret is allowed. If you need to have more, use the ssh secret type for the others instead.

Note

Depending on your github repo’s security settings you may need to enable sso for your ssh key to work.