Skip to main content

Repository secrets management

These secrets are used to authenticate with the custom image registry. They are stored in the namespace configuration file.

User that created the secret is the only one that can delete it or update access to it. By default, all users from that namespace have access to the secret.

Create a secret​

To create a secret, you need to have a Docker registry URL, username, and password. You can define multiple registry urls for the same credentials.

cgc secret create SECRET_NAME -r REGISTRY_URL1 -r REGISTRY_URL2 -u USERNAME -p PASSWORD

List secrets​

You can list all secrets in the namespace. Information included in the list is:

  • secret name
  • secret type
  • registry urls
  • admin user_id
  • created at
  • whitelisted user_ids, where "*" means all users

To list all secrets in the namespace, use the following command:

cgc secret list

Delete a secret​

To delete a secret, you need to know the secret name. Only the user that created the secret can delete it OR CGC admin.

cgc secret delete SECRET_NAME

Update a secret​

You can update the secret registry urls, username, and password. Only the user that created the secret can update it.

cgc secret update -r REGISTRY_URL1 -r REGISTRY_URL2 -u USERNAME_UPDATED -p PASSWORD_UPDATED SECRET_NAME