uv icon indicating copy to clipboard operation
uv copied to clipboard

Unable to publish package to Google Artifact Registry

Open joaodaher opened this issue 2 months ago • 0 comments

We're currently migrating from Poetry to uv. We use Google Artifact Registry as our private PyPI server.

I was able to download private packages using uv with the pyproject.toml config:

[[tool.uv.index]]
name = "private-pypi"
url = "https://[email protected]/nilo-prd/python-nilo/simple/"

[tool.uv.sources]
our-private-lib = { index = "private-pypi" }

But I cannot publish/upload any private package.

I'm using: uv publish --keyring-provider subprocess --username __token__ --publish-url https://us-east1-python.pkg.dev/nilo-prd/python-libs/

And I get the output (when verbose) followed by a stuck execution:

DEBUG Checking keyring for credentials for __token__@https://us-east1-python.pkg.dev/nilo-prd/python-libs/
DEBUG Found credentials in keyring for https://us-east1-python.pkg.dev/nilo-prd/python-libs/
DEBUG Response code for https://us-east1-python.pkg.dev/nilo-prd/python-libs/: 401 Unauthorized

With twine I can execute:

twine upload --repository-url https://us-east1-python.pkg.dev/nilo-dev/python-libs/ dist/*

And successfully publish the package. So the keyring seems to be working fine.

Any idea of what I'm missing here?

joaodaher avatar Dec 10 '24 15:12 joaodaher