Creating a Repository in Artifact Registry

Create a repository in Artifact Registry to store non-container generic artifacts or blobs.

    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Artifact Registry.
    2. Under List scope, choose a compartment that you have permission to work in to host the repository.
    3. Click Create repository.
    4. Enter a name and description. Start the name with a letter or underscore, followed by letters, numbers, hyphens, or underscores. The length can be 1–255 characters.

      If you leave the name blank, the system generates a name that you can change later. The generated name has the format artifact-repository-<timestamp>. For example:

      artifact-repository-20230423180901

    5. Select a compartment to create the repository in. The default compartment is the one you selected under List scope, but you can select any compartment that you have permission to work in.
    6. Specify whether the new repository makes its artifacts immutable.

      Important

      Authorized users can use a repository's immutable artifacts, as is. However, no one can replace the immutable artifacts after the artifacts are uploaded to the repository. If anyone deletes an artifact, uploading another artifact with the deleted artifact name isn't allowed. For examples, see Artifact Registry Concepts.
    7. (Optional) Click Show advanced options and assign tags to the repository.

      If you have permission to create a resource in OCI, you also have permission to add free-form tags to that resource. To add a defined tag, you must have permission to use the tag namespace. For information about tagging, see Resource Tags. If you're not sure whether to add tags to this resource, skip this option. You can add tags later.

    8. Click Create.

      After creating a repository, you can upload artifacts into the repository. See Managing Artifacts in Artifact Registry.

  • To create a repository, use the artifacts repository resource, referenced in Artifact Registry CLI.

    Get all the commands for artifacts repository:

    oci artifacts repository -h

    Get help for the create command:

    oci artifacts repository create -h

    Find the required options:

    • --compartment-id
    • --repository-type
    • --is-immutable

    Find options that are not required:

    • --display-name
    • --description
    • --freeform-tags
    • --defined-tags

    Create a repository:

    oci artifacts repository create --repository-type GENERIC --is-immutable <true or false> --display-name <repo-name> --compartment-id <compartment-OCID>
    Note

    For --repository-type, only GENERIC is allowed.

    Example:

    oci artifacts repository create --repository-type GENERIC --is-immutable true --display-name webb-app-repo --compartment-id ocid1.compartment.oc1..xxx...
  • Use the CreateRepository operation to create a repository for artifacts.