File: //snap/google-cloud-cli/396/help/man/man1/gcloud_artifacts_repositories_create.1
.TH "GCLOUD_ARTIFACTS_REPOSITORIES_CREATE" 1
.SH "NAME"
.HP
gcloud artifacts repositories create \- create an Artifact Registry repository
.SH "SYNOPSIS"
.HP
\f5gcloud artifacts repositories create\fR (\fIREPOSITORY\fR\ :\ \fB\-\-location\fR=\fILOCATION\fR) \fB\-\-repository\-format\fR=\fIREPOSITORY_FORMAT\fR [\fB\-\-allow\-snapshot\-overwrites\fR] [\fB\-\-async\fR] [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-disable\-remote\-validation\fR] [\fB\-\-immutable\-tags\fR] [\fB\-\-kms\-key\fR=\fIKMS_KEY\fR] [\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-mode\fR=\fIMODE\fR;\ default="NONE"] [\fB\-\-remote\-apt\-repo\fR=\fIREMOTE_APT_REPO\fR] [\fB\-\-remote\-apt\-repo\-path\fR=\fIREMOTE_APT_REPO_PATH\fR] [\fB\-\-remote\-docker\-repo\fR=\fIREMOTE_DOCKER_REPO\fR] [\fB\-\-remote\-go\-repo\fR=\fIREMOTE_GO_REPO\fR] [\fB\-\-remote\-mvn\-repo\fR=\fIREMOTE_MVN_REPO\fR] [\fB\-\-remote\-npm\-repo\fR=\fIREMOTE_NPM_REPO\fR] [\fB\-\-remote\-password\-secret\-version\fR=\fIREMOTE_PASSWORD_SECRET_VERSION\fR] [\fB\-\-remote\-python\-repo\fR=\fIREMOTE_PYTHON_REPO\fR] [\fB\-\-remote\-repo\-config\-desc\fR=\fIREMOTE_REPO_CONFIG_DESC\fR] [\fB\-\-remote\-username\fR=\fIREMOTE_USERNAME\fR] [\fB\-\-remote\-yum\-repo\fR=\fIREMOTE_YUM_REPO\fR] [\fB\-\-remote\-yum\-repo\-path\fR=\fIREMOTE_YUM_REPO_PATH\fR] [\fB\-\-upstream\-policy\-file\fR=\fIFILE\fR] [\fB\-\-version\-policy\fR=\fIVERSION_POLICY\fR] [\fB\-\-allow\-vulnerability\-scanning\fR\ |\ \fB\-\-disable\-vulnerability\-scanning\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "DESCRIPTION"
Create a new Artifact Registry repository.
This command can fail for the following reasons:
.RS 2m
.IP "\(bu" 2m
A repository with the same name already exists.
.IP "\(bu" 2m
The active account does not have permission to create repositories.
.IP "\(bu" 2m
A valid repository format was not provided.
.RE
.sp
.SH "EXAMPLES"
To create a docker repository with the name \f5my\-repo\fR in the default
project and location, run the following command:
.RS 2m
$ gcloud artifacts repositories create my\-repo \e
\-\-repository\-format=docker
.RE
To create a docker repository \f5my\-repo\fR with a KMS key
\f5projects/my\-project/locations/us/keyRings/my\-kr/cryptoKeys/my\-key\fR in
the default project and location, run the following command:
.RS 2m
$ gcloud artifacts repositories create my\-repo \e
\-\-repository\-format=docker \e
\-\-kms\-key=projects/my\-project/locations/us/keyRings/my\-kr/\e
cryptoKeys/my\-key
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Repository resource \- The Artifact Registry repository to create. The arguments
in this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in other
ways.
To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5repository\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fIREPOSITORY\fR
ID of the repository or fully qualified identifier for the repository.
To set the \f5repository\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5repository\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
Location of the repository. Overrides the default artifacts/location property
value for this command invocation. To configure the default location, use the
command: gcloud config set artifacts/location.
To set the \f5location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5repository\fR on the command line with a fully specified
name;
.IP "\(bu" 2m
provide the argument \f5\-\-location\fR on the command line;
.IP "\(bu" 2m
set the property \f5artifacts/location\fR.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-repository\-format\fR=\fIREPOSITORY_FORMAT\fR
Format of the repository. REPOSITORY_FORMAT must be one of:
.RS 2m
apt
APT package format.
docker
Docker image format.
go
Go module format.
kfp
KFP package format.
maven
Maven package format.
npm
NPM package format.
python
Python package format.
yum
YUM package format.
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-allow\-snapshot\-overwrites\fR
(Maven only) Allow repository users to publish a snapshot that overwrites the
same snapshot version in the repository.
.TP 2m
\fB\-\-async\fR
Return immediately, without waiting for the operation in progress to complete.
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR
Description for the repository.
.TP 2m
\fB\-\-disable\-remote\-validation\fR
Do not make an HTTP request to validate the remote upstream. Not recommended
when setting a custom remote upstream unless you are absolutely sure your
upstream URI and any auth is valid.
.TP 2m
\fB\-\-immutable\-tags\fR
(Docker only) Prevent changes to tagged images in the repository. Tags cannot be
deleted or moved to a different image digest, and tagged images cannot be
deleted.
.TP 2m
\fB\-\-kms\-key\fR=\fIKMS_KEY\fR
Name of the encryption key that's used for encrypting the contents of the
repository.
.TP 2m
\fB\-\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.
.TP 2m
\fB\-\-mode\fR=\fIMODE\fR; default="NONE"
Mode is the type of the repository \- Standard, Virtual or Remote. \fIMODE\fR
must be one of:
.RS 2m
.TP 2m
\fBnone\fR
Repository mode not specified.
.TP 2m
\fBremote\-repository\fR
Remote repository mode \- fetches data from upstream and caches it.
.TP 2m
\fBstandard\-repository\fR
Standard repository mode \- should be possible to write/read data to this repo.
.TP 2m
\fBvirtual\-repository\fR
Virtual repository mode \- aggregates data from several upstreams.
.RE
.sp
.TP 2m
\fB\-\-remote\-apt\-repo\fR=\fIREMOTE_APT_REPO\fR
(Apt only) Repository base for apt remote repository. REMOTE_APT_REPO must be
one of: [debian, debian\-snapshot, ubuntu].
.TP 2m
\fB\-\-remote\-apt\-repo\-path\fR=\fIREMOTE_APT_REPO_PATH\fR
(Apt only) Remaining URL path to apt remote repository.
.TP 2m
\fB\-\-remote\-docker\-repo\fR=\fIREMOTE_DOCKER_REPO\fR
(Docker only) Repo upstream for docker remote repository. REMOTE_DOCKER_REPO can
be either:
.RS 2m
.IP "\(em" 2m
one of the following enums: [docker\-hub].
.IP "\(em" 2m
an http/https custom registry uri (ex: https://my.docker.registry)
.RE
.sp
.TP 2m
\fB\-\-remote\-go\-repo\fR=\fIREMOTE_GO_REPO\fR
(Go only) Repo upstream for Go remote repository. "https://proxy.golang.org/" is
the only valid value.
.TP 2m
\fB\-\-remote\-mvn\-repo\fR=\fIREMOTE_MVN_REPO\fR
(Maven only) Repo upstream for maven remote repository. REMOTE_MVN_REPO can be
either:
.RS 2m
.IP "\(em" 2m
one of the following enums: [maven\-central].
.IP "\(em" 2m
an http/https custom registry uri (ex: https://my.maven.registry)
.RE
.sp
.TP 2m
\fB\-\-remote\-npm\-repo\fR=\fIREMOTE_NPM_REPO\fR
(Npm only) Repo upstream for npm remote repository. REMOTE_NPM_REPO can be
either:
.RS 2m
.IP "\(em" 2m
one of the following enums: [npmjs].
.IP "\(em" 2m
an http/https custom registry uri (ex: https://my.npm.registry)
.RE
.sp
.TP 2m
\fB\-\-remote\-password\-secret\-version\fR=\fIREMOTE_PASSWORD_SECRET_VERSION\fR
Secret Manager secret version that contains password for the remote repository
upstream.
.TP 2m
\fB\-\-remote\-python\-repo\fR=\fIREMOTE_PYTHON_REPO\fR
(Python only) Repo upstream for python remote repository. REMOTE_PYTHON_REPO can
be either:
.RS 2m
.IP "\(em" 2m
one of the following enums: [pypi].
.IP "\(em" 2m
an http/https custom registry uri (ex: https://my.python.registry)
.RE
.sp
.TP 2m
\fB\-\-remote\-repo\-config\-desc\fR=\fIREMOTE_REPO_CONFIG_DESC\fR
The description for the remote repository config.
.TP 2m
\fB\-\-remote\-username\fR=\fIREMOTE_USERNAME\fR
Remote Repository upstream registry username.
.TP 2m
\fB\-\-remote\-yum\-repo\fR=\fIREMOTE_YUM_REPO\fR
(Yum only) Repository base for yum remote repository. REMOTE_YUM_REPO must be
one of: [centos, centos\-debug, centos\-stream, centos\-vault, epel, rocky].
.TP 2m
\fB\-\-remote\-yum\-repo\-path\fR=\fIREMOTE_YUM_REPO_PATH\fR
(Yum only) Remaining URL path to yum remote repository.
.TP 2m
\fB\-\-upstream\-policy\-file\fR=\fIFILE\fR
(Virtual Repositories only) is the upstreams for the Virtual Repository. Example
of the file contents: [ { "id": "test1", "repository":
"projects/p1/locations/us\-central1/repositories/repo1", "priority": 1 }, {
"id": "test2", "repository":
"projects/p2/locations/us\-west2/repositories/repo2", "priority": 2 } ]
.TP 2m
\fB\-\-version\-policy\fR=\fIVERSION_POLICY\fR
(Maven only) The package versions that the repository will store.
\fIVERSION_POLICY\fR must be one of:
.RS 2m
.TP 2m
\fBnone\fR
(Maven only) The repository doesn't validate the version type.
.TP 2m
\fBrelease\fR
(Maven only) The repository accepts release versions only.
.TP 2m
\fBsnapshot\fR
(Maven only) The repository accepts snapshot versions only.
.RE
.sp
.TP 2m
At most one of these can be specified:
.RS 2m
.TP 2m
\fB\-\-allow\-vulnerability\-scanning\fR
Allow vulnerability scanning on the repository.
.TP 2m
\fB\-\-disable\-vulnerability\-scanning\fR
Disable vulnerability scanning on the repository.
.RE
.RE
.sp
.SH "GCLOUD WIDE FLAGS"
These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.
Run \fB$ gcloud help\fR for details.
.SH "API REFERENCE"
This command uses the \fBartifactregistry/v1\fR API. The full documentation for
this API can be found at: https://cloud.google.com/artifacts/docs/
.SH "NOTES"
These variants are also available:
.RS 2m
$ gcloud alpha artifacts repositories create
.RE
.RS 2m
$ gcloud beta artifacts repositories create
.RE