-
Notifications
You must be signed in to change notification settings - Fork 339
Open
Description
The issue appears to be very similar to #1166.
It seems that the latest version of google-auth
does not work with keyring
when fetching GCP credentials to install a library from a private GCP Artifact Registry. Rolling back to google-auth==2.40.3
resolves the problem.
Tested with keyring versions 24.3.1
and 25.6.0
, and keyrings.google-artifactregistry-auth==1.1.2
.
Failed to find credentials, Please run: `gcloud auth application-default login or export GOOGLE_APPLICATION_CREDENTIALS=<path/to/service/account/key>`
at /usr/local/lib/python3.10/site-packages/keyrings/gauth.py:58 in get_password
54│ except Exception as e:
55│ logging.warning("Failed to retrieve credentials from gcloud: {0}".format(e))
56│
57│ logging.warning("Artifact Registry PyPI Keyring: No credentials could be found.")
→ 58│ raise Exception("Failed to find credentials, Please run: `gcloud auth application-default login or export GOOGLE_APPLICATION_CREDENTIALS=<path/to/service/account/key>`")
59│
60│ def set_password(self,service,username,password):
61│ raise NotImplementedError()
62│
Cannot install [PRIVATE_PACKAGE].
Environment details
- OS: MacOS / Linux
- Python version: 3.10
- pip version: 25.0.1
google-auth
version: 2.41.1
Steps to reproduce
python3.10 -m venv ./venv
source ./venv/bin/activate
pip install keyring keyrings.google-artifactregistry-auth
export PIP_EXTRA_INDEX_URL="[GCP_PRIVATE_ARTIFACT_REGISTRY_URL]"
pip install [PRIVATE_PACKAGE]
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels