Remote repositories overview

Remote repositories act as proxies for upstream sources, such as Docker Huband Maven Central, and provide more control over your dependencies inGoogle Cloud. This document describes how remote repositories work and providesseveral use cases.

For instructions on how to create a remote repository, seeCreate remote repositories.

Note: Artifact RegistryQuotas and limits apply to remote repositories.

How remote repositories work

Remote repositories store artifacts from standard Artifact Registry repositoriesand external sources. The first time that you request a version of a package,Artifact Registrydownloads and caches the package in the remote repository. The next time yourequest the same package version, Artifact Registry serves the cached copy.

If you request an artifact from an upstream source that doesn't exist, ordoesn't contain the version you specified, the request will fail.

Upstream authentication

Artifact Registry remote repositories supportbasic authentication to upstream sources for supportedformats. For more information on how to authenticate to remote repositoryupstream sources, seeConfigure authentication to remote repository upstreams.

Use cases and benefits

Faster, more reliable access to artifacts
Storing cached copies of your public dependencies in Artifact Registryreduces latency when other Google Cloud services retrieve images.Cached artifacts are also still available if the external public repositoryis offline due to an outage or other issue.
Safer dependency resolution

Use remote repositories together with virtual repositories to mitigate risksassociated with public dependencies. Some tools do not provide a way tocontrol search order when a mix of private and public repositories areconfigured in the client. This type of configuration is vulnerable to adependency confusion attack, where someone uploads a new version of apackage with bad code to a public repository to trick clients into choosingthe bad version.

Instead of configuring clients directly to search multiple repositories, youcan configure virtual repositories to prioritize your private repositoriesover remote repositories.

Reduce data transfer cost

Use remote repositories to cache artifacts in the same region or multi-regionas your runtimes to reducedata transfer costs.

If Artifact Registry is in aVPC Service Controls service perimeter,Artifact Registry denies access to upstream sources outside the perimeterby default. To allow remote repositories in a specific location to accesstheir configured external sources outside the perimeter, see the instructionsforVPC Service Controls configuration.

To learn about other dependency management best practices, seeDependency management.

Updates to package indexes and metadata

Mutable files such as package indexes and metadata are updatedfrom the upstream source when they become more than the default age. Defaultsfor specific file types are listed in the following table:

FormatFile typeDefault update age
Mavenmaven-metadata.xml5 minutes
archetype-catalog.xml1 hour
NpmManifest files5 minutes
PythonIndex files1 hour
DockerList/Get tags cache1 hour
Apt/Yum (preview)Index files2 minutes
Package files72 hours

Supported formats

See the following sections for the formats available for preset and user-definedremote repositories.

Preset upstream URLs

A number of common upstream repository URLs are available as preset selectionsfor convenience in the following formats.

Formatpackage typesUpstream URLUpstream preset name
DockerPublic or privatehttps://registry-1.docker.ioDOCKER-HUB
GoPublichttps://proxy.golang.orghttps://proxy.golang.org
MavenPublic or privatehttps://repo.maven.apache.org/maven2MAVEN-CENTRAL
npmPublic or privatehttps://registry.npmjs.orgNPMJS
PythonPublichttps://pypi.ioPYPI
OS packages (preview)PublicSeeOS packages supported upstreamsSeeOS packages supported upstreams

OS packages preset upstreams

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

You can create an OS package remote repository by choosing from one of thecommon preset upstream repository base URLs and customizing the remainder of theURL to the specific repository. The following repository bases are supported:

Apt

RepositoryURL PrefixRepository Base Name
Archived Debianhttps://snapshot.debian.orgDEBIAN_SNAPSHOT
Debianhttp://deb.debian.orgDEBIAN
Ubuntu LTS or Prohttp://archive.ubuntu.comUBUNTU

Yum

RepositoryURL PrefixRepository BaseName
CentOShttp://mirror.centos.orgCENTOS
http://debuginfo.centos.orgCENTOS_DEBUG
https://vault.centos.orgCENTOS_VAULT
https://mirror.stream.centos.orgCENTOS_STREAM
Rockyhttp://dl.rockylinux.orgROCKY
Fedora Extra Packagesfor Enterprise Linux(EPEL)https://dl.fedoraproject.org/pub/epelEPEL

Artifact Registry repository upstreams

You can create remote repositories with Artifact Registry standard formatrepositories as upstreams for the following formats:

  • Docker
  • npm
  • Maven
  • Python

Custom URLs

You can enter the URL for your remote repository directly, without using one ofthe preset upstream sources for the following formats.

  • Docker
  • npm
  • Maven
  • Python

The following non-exhaustive table lists some common upstream URIs.

FormatUpstream URIRegistry Name
Dockerhttps://ghcr.ioGitHub Container Registry
Dockerhttps://registry-1.docker.ioDocker Hub
Dockerhttps://public.ecr.awsAWS ECR Public Gallery
Dockerhttps://registry.k8s.ioKubernetes Container Registry
Dockerhttps://MY_NEXUS_IPNexus
npmhttps://registry.npmjs.orgnpm
npmhttps://npm.pkg.github.comGitHub Npm Registry
npmhttps://MY_NEXUS_IP/repository/MY_UPSTREAM_REPOSITORYNexus
Mavenhttps://repo.maven.apache.org/maven2Maven Central
Mavenhttps://MY_NEXUS_IP/repository/MY_UPSTREAM_REPOSITORYNexus
Pythonhttps://pypi.ioPython Package Index (PyPI)
Pythonhttps://MY_NEXUS_IP/repository/MY_UPSTREAM_REPOSITORYNexus

Where

  • MY_NEXUS_IP is the IP address and port of your Nexus upstreaminstance.
  • MY_UPSTREAM_REPOSITORY is the name of your upstream repository;used in the Nexus examples.

Limitations

In addition to Artifact Registry quotas and limitations, remoterepositories have the following limitations:

  • Maven remote repositories don't permit setting the version policy to snapshotor release.
  • Upstream sources must be internet accessible. Remote repositories don'tsupport on-premise or Virtual Private Cloud (VPC) network upstream sourceswithout a public IP address.

Other repository modes

The other repository modes are:

  • Standard: The default repository mode. You upload or publishartifacts such as private packages directly to standard repositories.Although you can download directly from individual standard repositories,accessing groups of repositories with a virtual repository simplifiestool configuration.
  • Virtual: A repository that acts as a single accesspoint for multiple upstream repositories, including remote and standardrepositories.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.