Skip to content
Latchkey

gcloud artifacts repositories list: List AR Repos

gcloud artifacts repositories list enumerates the Artifact Registry repositories in a project and location.

Before pushing or pulling you may need to know which repos exist and where. This lists them with their format (docker, npm, maven) and location.

What it does

gcloud artifacts repositories list returns the repositories in the active project, optionally scoped to one --location. Each row shows the repository name, format, mode, and region.

Common usage

Terminal
gcloud artifacts repositories list --location=us-central1
# just the names and formats
gcloud artifacts repositories list \
  --format='table(name, format, location)'

Flags

FlagWhat it does
--location <region>Restrict to a single location
--project <id>Project to list repositories in
--format <fmt>Output format, e.g. table(...) or value(name)
--filter <expr>Filter rows, e.g. format=DOCKER

In CI

Authenticate keylessly with Workload Identity Federation and set the location explicitly; without --location the command lists across all locations which is slower and noisier. Use --format=value(name) to drive scripted repo discovery.

Common errors in CI

"PERMISSION_DENIED: Permission 'artifactregistry.repositories.list' denied" means the identity lacks roles/artifactregistry.reader. "Artifact Registry API has not been used in project ... before or it is disabled" means you must enable artifactregistry.googleapis.com first. An empty result with no error usually means a wrong --location.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →