Update repository settings

You can update the following repository settings:

  • Repository description.

  • Immutable tags (Preview) for Docker repositories. If you enable this setting, an image tag always points to the same image digest, including the default latest tag.

    To learn more about image tags, image digests, and immutable tags, see Container image versions.

  • Repository labels.

Required roles

To get the permissions that you need to update repository settings, ask your administrator to grant you the Artifact Registry Administrator (roles/artifactregistry.admin) IAM role on the Google Cloud project. For more information about granting roles, see Manage access.

You might also be able to get the required permissions through custom roles or other predefined roles.

Update settings

You can update settings using Google Cloud console or Google Cloud CLI.

Console

  1. Open the Repositories page in the Google Cloud console.

    Open the Repositories page

  2. In the repository list, select the repository and click Edit Repository.

  3. Edit the settings that you want to change.

    • Change the repository description
    • Enable or disable immutable tags (Preview) with the Immutable tags check box. If you enable this setting, the following actions are not permitted:

      • Delete a tagged image.
      • Remove a tag from an image.
      • Push an image with a tag that is already used by another version of the image in the repository.
      • Add, remove, or update labels
  4. Click Save.

gcloud

To edit the repository description, run the following command:

gcloud artifacts repositories update REPOSITORY \
    --project=PROJECT-ID \
    --location=LOCATION \
    --description="DESCRIPTION"

To edit the tag mutability, run one of the following commands:

To set tags to immutable:

gcloud artifacts repositories update REPOSITORY \
    --project=PROJECT-ID \
    --location=LOCATION \
    --immutable-tags

To set tags to mutable:

gcloud artifacts repositories update REPOSITORY \
    --project=PROJECT-ID \
    --location=LOCATION \
    --no-immutable-tags

To update labels, run the following command:

gcloud artifacts repositories update REPOSITORY \
    --project=PROJECT-ID \
    --location=LOCATION \
    --update-labels="KEY=VALUE,..."

Replace the following values:

  • REPOSITORY is the name of the repository. If you configured a default repository, you can omit this flag to use the default.
  • PROJECT-ID is the Google Cloud project ID. If this flag is omitted, the current or default project is used.
  • LOCATION is a regional or multi-regional location. Use this flag to view repositories in a specific location. If you configured a default location, you can omit this flag to use the default.
  • DESCRIPTION is a description for the repository.
  • TAG-SETTING indicates how tags are associated with versions of images.
  • --no-immutable-tags: The image version that tag points to can change. Deleting images, removing tags, and changing the version of an image that a tag points to are permitted.
  • --immutable-tags: In the repository, a tag always points to same version of an image. The following actions are not permitted:
    • Delete a tagged image.
    • Remove a tag from an image.
    • Push an image with a tag that is already used by another version of the image in the repository.
  • KEY=VALUE,... is a list of comma-separated labels specified as key-value pairs. For example: team=team-1,product=example_product,stage=development. For more information about working with labels, see Label repositories.