Creating a Repository in Artifact Registry
Create a repository in Artifact Registry to store non-container generic artifacts or blobs.
- Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Artifact Registry.
- Under List scope, choose a compartment that you have permission to work in to host the repository.
- Click Create repository.
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:
- 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.
Specify whether the new repository makes its artifacts immutable.
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.
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.
After creating a repository, you can upload artifacts into the repository. See Managing Artifacts in Artifact Registry.
To create a repository, use the
artifacts repositoryresource, referenced in Artifact Registry CLI.
Get all the commands for
oci artifacts repository -h
Get help for the
oci artifacts repository create -h
Find the required options:
Find options that are not required:
Create a repository:
oci artifacts repository create --repository-type GENERIC --is-immutable <true or false> --display-name <repo-name> --compartment-id <compartment-OCID>Note
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.