Use Tanzu Mission Control to create repository credentials in your cluster or cluster group for repositories that require authentication.

Prerequisites

Log in to the Tanzu Mission Control console, as described in Log In to the Tanzu Mission Control Console.

Make sure you have the appropriate permissions to create a repository credential.
  • To create a repository credential, you must be associated with the cluster.admin or clustergroup.admin role.

This procedure assumes that you have already enabled continuous delivery for your cluster, as described in Enable Continuous Delivery for a Cluster.

If you want to use an SSH key to authenticate, then make sure you have already generated the key as described in Generate an SSH Key for Authentication to a Git Repository.

This procedure is necessary only if you intend to connect to a repository that requires authentication. If your repository does not require authentication, you can skip this procedure.

Procedure

  1. Navigate to the cluster or cluster group for which you want to create a repository credential.
  2. On the cluster or cluster group detail page, click the Add-ons tab.
  3. In the navigation menu below Secrets, click Repository credentials.
  4. Click Create Repository Credential.
  5. Enter a name for the repository credential.
  6. You can optionally provide a description for the credential.
  7. Select the type of credential to create, and then enter the required information.
    • For a Username/Password credential, enter the user name and password required to access the repository.

      If your repository is hosted in GitHub, use a personal access token because GitHub prevents cloning with username/password authentication. Put your personal access token in the password field.

    • For an SSH Key credential, enter the SSH key and known hosts through which to access the repository. For more information, see Generate an SSH Key for Authentication to a Git Repository.

      If you are using a Git repository that requires authentication for access, then you must use SSH key authentication.

    • For a CA Certificate credential, enter the CA certificate and optionally username and password to access the repository, depending on how your Git repository is configured.
  8. After you finish configuring the credential, click Create Repository Credential.

Results

When you click Create Repository Credential, Tanzu Mission Control creates a credential in your cluster. You can use this repository credential when you add a Git repository to your cluster. If you subsequently disable continuous delivery on your cluster, Tanzu Mission Control removes the credential.