- NAME
-
- gcloud artifacts attachments download - download an Artifact Registry attachment from a repository
- SYNOPSIS
-
-
gcloud artifacts attachments download[ATTACHMENT:--location=LOCATION--repository=REPOSITORY]--destination=DESTINATION[--chunk-size=CHUNK_SIZE] [--oci-version-name=OCI_VERSION_NAME] [--parallelism=PARALLELISM] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Download an Artifact Registry attachment from a repository.
- EXAMPLES
-
To download the attachment
my-attachmentto/path/to/destination/:gcloud artifacts attachments download my-attachment --destination=/path/to/destination/To download the attachment
my-attachmentin 8000 byte chunks to/path/to/destination/:gcloud artifacts attachments download my-attachment --destination=/path/to/destination/ --chunk-size=8000To download the attachment
my-attachmentusing parallel multipart download with 4 threads:gcloud artifacts attachments download my-attachment --destination=/path/to/destination/ --parallelism=4For Docker-format repositories only: to download the attachment stored in the OCI version
projects/my-project/locations/us/repositories/my-repo/packages/my-package/versions/sha256:123to/path/to/destination/:gcloud artifacts attachments download --oci-version-name=projects/my-project/locations/us/repositories/my-repo/packages/my-package/versions/sha256:123 --destination=/path/to/destination/For Docker-format repositories only: to download the attachment stored in the OCI version with URI
us-docker.pkg.dev/my-project/my-repo/my-package@sha256:123to/path/to/destination/:gcloud artifacts attachments download --oci-version-name=us-docker.pkg.dev/my-project/my-repo/my-package@sha256:123 --destination=/path/to/destination/ - POSITIONAL ARGUMENTS
-
-
Attachment resource - The Artifact Registry attachment name. 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
projectattribute:-
provide the argument
attachmenton the command line with a fully specified name; -
provide the argument
--projecton the command line; -
set the property
core/project.
ATTACHMENT-
ID of the attachment or fully qualified identifier for the attachment.
To set the
nameattribute:-
provide the argument
attachmenton the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location=LOCATION-
Location of the attachment.
To set the
locationattribute:-
provide the argument
attachmenton the command line with a fully specified name; -
provide the argument
--locationon the command line; -
set the property
artifacts/location.
-
provide the argument
--repository=REPOSITORY-
Repository of the attachment.
To set the
repositoryattribute:-
provide the argument
attachmenton the command line with a fully specified name; -
provide the argument
--repositoryon the command line; -
set the property
artifacts/repository.
-
provide the argument
-
provide the argument
-
Attachment resource - The Artifact Registry attachment name. 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.
- REQUIRED FLAGS
-
--destination=DESTINATION- Path where you want to save the downloaded attachment files.
- OPTIONAL FLAGS
-
--chunk-size=CHUNK_SIZE- If specified, the chunk size (bytes) to use for downloading the package.
--oci-version-name=OCI_VERSION_NAME- For Docker-format repositories only. The version name of the OCI artifact to download.
--parallelism=PARALLELISM- Specifies the number of threads to use for downloading the attachment files in parallel.
- 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
$ gcloud helpfor details.
gcloud artifacts attachments download
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-19 UTC.