-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status code 403 with pip 21.1.x and keyrings.google-artifactregistry-auth 0.0.2 #7
Comments
It looks like the keyring is not called at all with pip 21.1.x, because using pip 21.0.1, I can see the logs messages from the keyring that I don't see with pip 21.1.x
|
maybe linked to pypa/pip#9870 |
@megan-kuo @Gridasov : can you confirm something changed very recently and now the GAR returns a 401 instead of a 403 when not authenticated? |
Yes, Artifact Registry now returns a 401 instead of a 403 when not authenticated. Can you elaborate a bit more on your issue? It is the intended behavior that users should have to set up authentication by installing Also, you can use ar-contact@google.com to reach our team :) |
If the expected mandatory behaviour is to install the keyrings packages before configuring the pip.conf, what is the way to do it inside [testenv]
install_command = {toxinidir}/path/to/tox_custom_install_command.sh {opts} {packages}
#!/usr/bin/env bash
PIP_CONFIG_FILE=/dev/null pip install --upgrade pip==21.1.1
PIP_CONFIG_FILE=/dev/null pip install 'keyring>=23.0.1'
PIP_CONFIG_FILE=/dev/null pip install 'keyrings.google-artifactregistry-auth>=0.0.2'
pip install "$@"
? |
Hello, I'm both
tox under the hood uses virtualenv, not venv. The problem described to me sounds like a valid virtual environment on these machines is one that doesn't just have pip+setuptools+wheel in it but also Your hacky solution works too, but is kinda hacky 😮 |
Hi @looztra, once #9 is released, this should be resolved by configuring your project as described in https://github.com/GoogleCloudPlatform/artifact-registry-python-tools#usage-with-tox instead. Will be interested to hear if that works for you! |
@di this doesn't solve my problem, because I have an existing pip.conf file that references the GAR, so when trying to create the venv, all the pip commands that try to install packages on pypi fail |
@looztra Instead of globally configuring
|
I'm experimenting this way to do it, so far so good. |
The text was updated successfully, but these errors were encountered: