Artifact Registry lets you view and list repositories in your Google Cloud
project to inspect available artifact locations and configuration details.

## Before you begin

Optional: [Configure defaults for Google Cloud CLI commands](https://docs.cloud.google.com/artifact-registry/docs/repositories/gcloud-defaults).

### Required roles


To get the permissions that
you need to view and list repositories,

ask your administrator to grant you the
following IAM roles:

- View and list all repositories in a Google Cloud project: [Artifact Registry Reader](https://docs.cloud.google.com/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the project
- View a specific repository: [Artifact Registry Reader](https://docs.cloud.google.com/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the repository


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access).


These predefined roles contain

the permissions required to view and list repositories. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to view and list repositories:

- `artifactregistry.repositories.get`
- `artifactregistry.repositories.list`


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Viewing repositories

You can view repositories within a Google Cloud project.

To view a list of repositories:

### Console

Open the **Repositories** page in the Google Cloud console.

<br />

[Open the Repositories page](https://console.cloud.google.com/artifacts)

<br />

The page displays a list of your repositories.

To filter the Artifact Registry repository list:

1. Above the repository list, click **Filter Table**.
2. Choose a filter from the filter list.
3. Specify the value that you want to use for filtering the list.

### gcloud

To list existing repositories, run the following command:

```bash
gcloud artifacts repositories list [--project=PROJECT] \
[--location=LOCATION]
```

To view the type of encryption configured for a repository, run the following
command:

```bash
gcloud artifacts repositories describe REPOSITORY \
[--project=PROJECT] [--location=LOCATION]
```

In the previous commands, replace the following values:

- <var translate="no">`PROJECT`</var> is the project ID. If this flag is omitted, the current or default project is used.
- <var translate="no">`REPOSITORY`</var> is the name of the repository.
-

  <var translate="no">`LOCATION`</var> is the regional or multi-regional
  [location](https://docs.cloud.google.com/artifact-registry/docs/repo-locations) of the repository.


  Use the `--location` flag to view repositories in a specific location.
  You can also use `--location=all` to list repositories across all
  locations.

  If you omit this flag, the command uses the [default](https://docs.cloud.google.com/artifact-registry/docs/repositories/gcloud-defaults#set)
  location if a default is configured. Otherwise, omitting this flag lists
  repositories across all locations.

For more information about the command, run the following command:

     gcloud artifacts repositories list --help

## What's next

- Configure [access](https://docs.cloud.google.com/artifact-registry/docs/access-control) to your repositories.
- [Download individual files](https://docs.cloud.google.com/artifact-registry/docs/repositories/download-files) within artifacts stored in your repositories.
- Learn to [restrict artifact downloads with download rules](https://docs.cloud.google.com/artifact-registry/docs/restrict-artifact-downloads).