Invalid repository type PYTHON. Valid type is PYPI

Viewed 222

I have created (using terraform resource google_artifact_registry_repository) a python repository on Google Artifact Registry. Here's my terraform code that created it:

resource "google_artifact_registry_repository" "pypi" {
  provider      = google-beta
  project       = var.project_id
  location      = var.region
  repository_id = "dataplatformpypi"
  description   = "PyPi repo for use by dataplatform"
  format        = "PYTHON"
}

here is that repository:

enter image description here

I am now following the quickstart at https://cloud.google.com/artifact-registry/docs/python/quickstart, specifically the Configure authentication section which instructs me to issue gcloud artifacts print-settings python. I actually modify that slightly to issue:

gcloud --project myproject artifacts print-settings python --repository dataplatformpypi --location europe-west2

and I get error:

ERROR: (gcloud.artifacts.print-settings.python) Invalid repository type PYTHON. Valid type is PYPI.

I haven't specified the repository type as part of that command so I can only assume that "repository type PYTHON" refers to the format of the repository:

enter image description here

However given that the repository has been created successfully and PYTHON is (according to the terraform resource documentation) a valid value for the repository format I am struggling to understand what the problem is here.

I would appreciate any advice.

1 Answers

It doesn't appear to be a user-specific problem. Other users have also encountered the issue. There's a similar issue ongoing in GitHub. You can follow the thread here.

Related