Skip to main content

Private Repositories in Enterprise

Okteto generates an SSH key the first time it boots. This key is the identity used by Okteto when cloning repositories while executing a git deployment pipeline. You can use this SSH key to give Okteto permission to clone private repositories.

Add the public key to your source code provider#

The public SSH is available on the Git section on the Settings -> Integrations page. Click on the Show SSH Key button to reveal the value. This will only be displayed for users with the Admin role.

show SSH key

You can also retreive the public SSH key by running the command below:

kubectl get secret okteto-ssh -n=okteto -ojsonpath='{.data.identity\.pub}' | base64 --decode

Once you have the public key, follow your source code provider's instructions on how to add the SSH key to your account. We recommend that you create a dedicated bot account for Okteto.

Deploy a Private Repository#

To deploy a private repository, use the SSH url of your git repository. This applies both when using the Deploy dialog in the dashboard and the okteto pipeline deploy command from your terminal.

add a private repository