In this article

Help us make these docs great!

All docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Setup Private Git Access

You can create packages using the source code from a private git repository. A source secret allows to access a private git repository or a git repository with a self-assigned or untrusted SSL certificate.

  • The platform uses git version 2.16.6.
  • While cloning a git repository, ensure that you provide the appropriate protocol (HTTP/HTTPS). The HTTP to HTTPS redirection does not work while cloning the repositories.

Creating Source Secret

To create a source secret for the private git repository:

  1. On the left navigation bar, click Account > Secrets.

  2. Click ADD NEW SECRET.

  3. In the Create new secret dialog, select Source secret.

  4. In the Name field, enter a name for the source secret. For example, source-secret-name.

The name should be less than 253 characters. It must consist of lower case alphanumeric characters or hyphen(-). It must begin and end with an alphanumeric character.

  1. From the Authentication drop-down menu, select either one of the following.

    1. Basic authentication: Select this option if you want to authenticate a user with either a git access token or username and password.

      1. Password: If you have selected this option, type your git username and password in the Username, and Password fields respectively.

      2. Token: If you have selected this option, type the corresponding git access token in the Token field.

    2. SSH authentication: Select this option if you want to authenticate a user with a private SSH key of a git repository.

      1. Enter the SSH key of your git repository in the SSH Key fields.
  2. Click Submit. The source secret is created.

To edit the secret, click the edit icon under Action.

To access the private source repositories:

rio secret create –t source <secret_name>

Select the source secret type, if you select basic-auth, specify the username and password.

Source secret type[basic-auth, ssh]: basic-auth
git username: <user_name>
git password: <password>

If you select ssh, specify the path to the SSH Private key.

Source secret type[basic-auth, ssh]: ssh
ssh key path: <path to key-file>

To automatically import secrets from the environment:

rio secret import ssh