You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to use Google artifact registry (GAR) with pipx, but can't seem to get the authentication to work as expected. I can get it to work with pip in a virtual environment when keyring is "imported", but not with pipx or pip with keyring as "subprocess". My end goal is to use pipx, but the fact that pip doesn't work with a subprocess keyring might be part of my issue.
What i think some of my issues are....
PIP_FORCE_KEYRING doesn't seem to be working as I don't see pip (through pipx) trying to authenticate to GAR. If I rerun pipx's commands, but remove the --no-input flag authentication will be attempted ... but fails, see next.
I don't think Im correctly using keyring via "subprocess", and can't seem to figure out how to make it work. Do I need to set the user in the extra-index-url to a oauth2 access token? How would I generate that (ive tried a few from gcloud without success).
set PIP_KEYRING_PROVIDER=subprocess
set PIP_FORCE_KEYRING=1
set PIP_EXTRA_INDEX_URL=https://***/simple/
pipx install --verbose ******
pipx >(setup:850): pipx version is 1.4.1
pipx >(setup:851): Default python interpreter is 'C:\Python311\python.exe'
pipx >(package_name_from_spec:370): Determined package name: ***
pipx >(package_name_from_spec:371): Package name determined in 0.0s
creating virtual environment...
pipx >(run_subprocess:168): running C:\Python311\python.exe -m venv --without-pip C:\Users\***\AppData\Local\pipx\pipx\venvs\***
pipx >(run_subprocess:168): running <checking pip's availability>
pipx >(run_subprocess:168): running C:\Users\***\AppData\Local\pipx\pipx\venvs\***\Scripts\python.exe -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:168): running C:\Users\***\AppData\Local\pipx\pipx\shared\Scripts\python.exe -c import sysconfig; print(sysconfig.get_path('purelib'))
pipx >(run_subprocess:168): running C:\Users\***\AppData\Local\pipx\pipx\venvs\***l\Scripts\python.exe --version
pipx >(_parsed_package_to_package_or_url:137): cleaned package spec: *****
installing *** from spec '******'...
pipx >(run_subprocess:168): running C:\Users\***\AppData\Local\pipx\pipx\venvs\***\Scripts\python.exe -m pip --no-input install ******
pipx >(subprocess_post_check_handle_pip_error:327): 'C:\\Users\\***\\AppData\\Local\\pipx\\pipx\\venvs\\***\\Scripts\\python.exe -m pip --no-input install ******' failed
pipx >(subprocess_post_check_handle_pip_error:342): Fatal error from pip prevented installation. Full pip output in file:
C:\Users\***\AppData\Local\pipx\pipx\Logs\cmd_2024-01-10_14.23.14_pip_errors.log
Some possibly relevant errors from pip install:
ERROR: Could not find a version that satisfies the requirement ****** (from versions: none)
ERROR: No matching distribution found for ******
pipx >(rmdir:55): removing directory C:\Users\***\AppData\Local\pipx\pipx\venvs\***
Error installing *** from spec '******'.
pip_errors.log
PIP STDOUT
----------
Looking in indexes: https://pypi.org/simple, https://***/simple/
PIP STDERR
----------
ERROR: Could not find a version that satisfies the requirement ****** (from versions: none)
ERROR: No matching distribution found for ******
FAILS: Run without --no-input
Using the same method as pipx to setup a venv and ru-run the failing command but without --no-input.
C:\Users*\AppData\Local\pipx\pipx\venvs*\Scripts\python.exe -m pip install ******
<<Looking in indexes: https://pypi.org/simple, https://***/simple/
<<User for ***: <---Wants user input for user name
WORKS: Run without --no-input and with keyring-provider as import
I'm adding the keyring package to this venv and forcing keyring-provider to be import.
C:\Users*\AppData\Local\pipx\pipx\venvs*\Scripts\python.exe -m pip install keyring keyrings.google-artifactregistry-auth
C:\Users*\AppData\Local\pipx\pipx\venvs*\Scripts\python.exe -m pip install ****** --keyring-provider import
The package is installed as expected here.
Expected behavior
I think pipx should install the package from GAR with the environment variable overrides and setup used.
The text was updated successfully, but these errors were encountered:
Describe the bug
Im trying to use Google artifact registry (GAR) with pipx, but can't seem to get the authentication to work as expected. I can get it to work with pip in a virtual environment when keyring is "imported", but not with pipx or pip with keyring as "subprocess". My end goal is to use pipx, but the fact that pip doesn't work with a subprocess keyring might be part of my issue.
What i think some of my issues are....
How to reproduce the issue
My setup.
FAILS: pipx install with GAR authentication via subprocess keyring-provider
pip_errors.log
FAILS: Run without --no-input
Using the same method as pipx to setup a venv and ru-run the failing command but without --no-input.
WORKS: Run without --no-input and with keyring-provider as import
I'm adding the keyring package to this venv and forcing keyring-provider to be import.
Expected behavior
I think pipx should install the package from GAR with the environment variable overrides and setup used.
The text was updated successfully, but these errors were encountered: