Private Repositories

Okteto generates an SSH key the first time it boots. This key is the identity used by Okteto when cloning repositories when 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 ssh key is stored in the okteto-ssh secret, in the same namespace where you installed Okteto Enterprise.

Run the command below to retrieve the public key:

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.