Ver e listar repositórios
Esta página descreve como ver e listar repositórios do Artifact Registry.
Antes de começar
Opcional: configure as predefinições para os comandos da CLI gcloud.
Funções necessárias
Para receber as autorizações de que
precisa para ver e listar repositórios,
peça ao seu administrador que lhe conceda as
seguintes funções do IAM:
Para mais informações sobre a atribuição de funções, consulte o artigo Faça a gestão do acesso a projetos, pastas e organizações.
Estas funções predefinidas contêm as autorizações necessárias para ver e listar repositórios. Para ver as autorizações exatas que são
necessárias, expanda a secção Autorizações necessárias:
Autorizações necessárias
São necessárias as seguintes autorizações para ver e listar repositórios:
-
artifactregistry.repositories.get
-
artifactregistry.repositories.list
Também pode conseguir
estas autorizações
com funções personalizadas ou
outras funções predefinidas.
Ver repositórios
Pode ver repositórios num Trusted Cloud projeto.
Para ver uma lista de repositórios:
Consola
Abra a página Repositórios na Trusted Cloud consola.
Abra a página Repositórios
A página apresenta uma lista dos seus repositórios.
Para filtrar a lista de repositórios do Artifact Registry:
- Acima da lista de repositórios, clique em Filtrar tabela.
- Escolha um filtro na lista de filtros.
- Especifique o valor que quer usar para filtrar a lista.
gcloud
Para apresentar uma lista dos repositórios existentes, execute o seguinte comando:
gcloud artifacts repositories list [--project=PROJECT] \
[--location=LOCATION]
Para ver o tipo de encriptação configurado para um repositório, execute o seguinte comando:
gcloud artifacts repositories describe REPOSITORY \
[--project=PROJECT] [--location=LOCATION]
Nos comandos anteriores, substitua os seguintes valores:
PROJECT
é o ID do projeto. Se esta flag for omitida, é usado o projeto atual ou predefinido.
REPOSITORY
é o nome do repositório.
LOCATION
é a localização regional do repositório.
Use a flag --location
para ver repositórios numa localização específica.
Também pode usar --location=all
para listar repositórios em todas as localizações.
Se omitir esta flag, o comando usa a localização predefinida
se estiver configurada uma predefinição. Caso contrário, a omissão desta flag apresenta os repositórios em todas as localizações.
Para mais informações sobre o comando, execute o seguinte comando:
gcloud artifacts repositories list --help
O que se segue?
- Configure o acesso aos seus repositórios.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-08-21 UTC.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-21 UTC."],[[["\u003cp\u003eThis page explains how to view and list Artifact Registry repositories within a Google Cloud project using the console or the gcloud command-line tool.\u003c/p\u003e\n"],["\u003cp\u003eTo view and list repositories, you need the Artifact Registry Reader role (\u003ccode\u003eroles/artifactregistry.reader\u003c/code\u003e) on the project or the specific repository, or equivalent permissions.\u003c/p\u003e\n"],["\u003cp\u003eThe console allows you to filter the repository list using various criteria, and the gcloud command enables listing repositories with optional filtering by project and location, or across all locations.\u003c/p\u003e\n"],["\u003cp\u003eThe gcloud command can also be used to view the encryption type of a specific repository.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to set a default project and location to be used with the gcloud command.\u003c/p\u003e\n"]]],[],null,["# View and list repositories\n\nThis page describes how to view and list Artifact Registry repositories.\n\nBefore you begin\n----------------\n\nOptional: [Configure defaults for Google Cloud CLI commands](/artifact-registry/docs/repositories/gcloud-defaults).\n\n### Required roles\n\n\nTo get the permissions that\nyou need to view and list repositories,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- View and list all repositories in a Google Cloud project: [Artifact Registry Reader](/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the project\n- View a specific repository: [Artifact Registry Reader](/iam/docs/roles-permissions/artifactregistry#artifactregistry.reader) (`roles/artifactregistry.reader`) on the repository\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThese predefined roles contain\n\nthe permissions required to view and list repositories. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to view and list repositories:\n\n- ` artifactregistry.repositories.get `\n- ` artifactregistry.repositories.list`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\n\nViewing repositories\n--------------------\n\nYou can view repositories within a Google Cloud project.\n\nTo view a list of repositories: \n\n### Console\n\nOpen the **Repositories** page in the Google Cloud console.\n\n\u003cbr /\u003e\n\n[Open the Repositories page](https://console.cloud.google.com/artifacts)\n\n\u003cbr /\u003e\n\nThe page displays a list of your repositories.\n\nTo filter the Artifact Registry repository list:\n\n1. Above the repository list, click **Filter Table**.\n2. Choose a filter from the filter list.\n3. Specify the value that you want to use for filtering the list.\n\n### gcloud\n\nTo list existing repositories, run the following command: \n\n```bash\ngcloud artifacts repositories list [--project=PROJECT] \\\n[--location=LOCATION]\n```\n\nTo view the type of encryption configured for a repository, run the following\ncommand: \n\n```bash\ngcloud artifacts repositories describe REPOSITORY \\\n[--project=PROJECT] [--location=LOCATION]\n```\n\nIn the previous commands, replace the following values:\n\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003ePROJECT\u003c/code\u003e\u003c/var\u003e is the project ID. If this flag is omitted, the current or default project is used.\n- \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eREPOSITORY\u003c/code\u003e\u003c/var\u003e is the name of the repository.\n-\n\n \u003cvar translate=\"no\"\u003e\u003ccode translate=\"no\" dir=\"ltr\"\u003eLOCATION\u003c/code\u003e\u003c/var\u003e is the regional or multi-regional\n [location](/artifact-registry/docs/repo-locations) of the repository.\n\n\n Use the `--location` flag to view repositories in a specific location.\n You can also use `--location=all` to list repositories across all\n locations.\n\n If you omit this flag, the command uses the [default](/artifact-registry/docs/repositories/gcloud-defaults#set)\n location if a default is configured. Otherwise, omitting this flag lists\n repositories across all locations.\n\nFor more information about the command, run the following command: \n\n gcloud artifacts repositories list --help\n\nWhat's next\n-----------\n\n- Configure [access](/artifact-registry/docs/access-control) to your repositories.\n- [Download individual files](/artifact-registry/docs/repositories/download-files) within artifacts stored in your repositories.\n- Learn to [restrict artifact downloads with download rules](/artifact-registry/docs/restrict-artifact-downloads)."]]