keyrings.google-artifactregistry-auth is a Python package that allows you to configure keyring to interact with Python repositories stored in Google Artifact Registry. The backend automatically searches for credentials from the environment and authenticates to Artifact Registry using Google Application Default Credentials or gcloud SDK credentials. The current version is 1.1.2.
pip install keyrings.google-artifactregistry-authVerified import paths — ran on the pinned version, not inferred.
The quickstart involves three main steps: authenticating your `gcloud` CLI (which the keyring backend uses), installing the `keyrings.google-artifactregistry-auth` package, and then configuring your Python tools (like `pip` or `twine`) to use your Artifact Registry repository. The backend automatically leverages your active `gcloud` credentials.
Upgrade `keyrings.google-artifactregistry-auth` to a newer version that addresses this, or pin `keyring<=23.8.2` as a temporary workaround.
Roll back `google-auth` to version 2.40.3 or earlier (`google-auth==2.40.3`).
Ensure only one primary authentication method is active. If encountering issues, try `gcloud auth revoke --all` to clear conflicting credentials.
Use Docker's secret volume mounts (`--secret`) to securely pass credentials during the build process.
Investigate Databricks-specific configuration or environment issues. It may require direct intervention to ensure the keyring backend is properly registered and accessible by the Python environment.
Migrate to Python 3. If Python 2 is unavoidable, use `keyrings.google-artifactregistry-auth-py2` and be aware it might not receive the same level of updates or support.
Upgrade `pip` to a recent version: `pip install -U pip`.
Authenticate using `gcloud auth application-default login` or set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to a service account key file path. Ensure the authenticated identity has necessary Artifact Registry permissions.
Ensure `keyring` and `keyrings.google-artifactregistry-auth` are installed (`pip install keyring keyrings.google-artifactregistry-auth`) and verify the backend is active using `keyring --list-backends`. For Python 3.12+, explicitly verify the backend with `python -m keyrings.google_artifactregistry_auth`.
Consolidate to a single authentication method. If using a service account, rely on `GOOGLE_APPLICATION_CREDENTIALS`. If using user credentials, ensure only `gcloud auth application-default login` (or `gcloud auth login` for interactive use) is used, and revoke conflicting credentials if necessary (`gcloud auth revoke --all`).