Learn about troubleshooting steps that apply to all artifact formats when working with Artifact Registry. For issues specific to an artifact format, refer to the format-specific page.
- Container images: Container images, Helm charts
- Language packages: Java, Node.js, Python
- OS packages
Invalid repository or location in commands
Use the following information to help you diagnose invalid repository location or invalid repository name errors.
Location and repository defaults for gcloud
If you set a default repository and location in the Google Cloud CLI
so that you can omit --location
and --repository
flags from
gcloud artifacts
commands, try running the command that failed with the
flags and corresponding values. For details about the syntax for a particular
command, run the command with the --help
flag.
The default repository setting does not apply to gcloud artifacts
commands
where you specify a repository name without the --repository
flag. For
example, you must specify the repository name in a
gcloud artifacts repositories describe command like the
following example:
gcloud artifacts repositories describe my-repo --location=us-west1
If your command still fails, you might need to verify that you specified valid values for the repository or location.
Repository location
To list all supported Artifact Registry locations, run the command:
gcloud artifacts locations list
Your organization policy might include location restrictions. Artifact Registry enforces these restrictions at repository creation time. Artifact Registry does not enforce policy retroactively on repositories that predate the location restrictions.
Repository names in gcloud commands
You can list repositories to view the repository names in a specified project or location.
To list all repositories in a project, run the command:
gcloud artifacts repositories list --project=PROJECT-ID \
--location=all
To list all repositories in a location, run the command:
gcloud artifacts repositories list --project=PROJECT-ID \
--location=LOCATION
Replace PROJECT-ID with your Google Cloud project ID and LOCATION with the repository location.
The command returns information for each repository similar to the following example:
REPOSITORY: my-repo
FORMAT: MAVEN
DESCRIPTION:
LOCATION: us-east1
LABELS:
ENCRYPTION: Google-managed key
CREATE_TIME: 2021-09-23T19:39:10
UPDATE_TIME: 2021-09-23T19:39:10
The value for REPOSITORY
is the value you use with gcloud artifacts
commands
that include the repository name as a parameter.
For example, this command uses the --repository
flag:
gcloud artifacts packages list --location=us-east1 --repository=my-repo
This command uses the repository name only without a flag:
gcloud artifacts repositories describe my-repo --location=us-west1
Repository names with third-party clients
For third-party clients, you generally use a full repository path when
configuring clients, such as us-east1-docker.pkg.dev/my-project/my-repo
. You
then follow the conventions of the client for uploading and downloading
packages. For client configuration and usage details, refer to the documentation
for the format you are working with.
- Container images: Docker, Helm
- Language packages: Java, Node.js, Python, Go
- OS packages: Debian, RPM
If you are transitioning from Container Registry, note that all image paths must include an Artifact Registry repository name. You cannot specify an image path that only includes a project ID.
- Invalid path:
us-east1-docker.pkg.dev/my-project/my-image
- Valid path:
us-east1-docker.pkg.dev/my-project/my-repo/my-image
Cannot push or pull from undeleted repositories
Repositories no longer work properly after you undelete a Google Cloud project or enable the Artifact Registry API after disabling it.
If you disable the Artifact Registry API or delete the project, Artifact Registry services become unavailable. Artifact Registry deletes repository data after 7 days.
Learn more about data deletion on Google Cloud.