Closed
Description
I am trying to use uv publish
to publish a new python package to a private registry.
I believe the private registry is a nexus repository.
pyproject.toml configuration
[project]
name = "my-example-package"
...
[[tool.uv.index]]
name = "pypi-publish-private"
url = "https:/mirrors.my-company.com/pypi/simple/"
publish-url = "https://pypi-publish.my-company.com/"
default = true
Command I am running:
uv publish -v --index pypi-publish-private
Output:
DEBUG uv 0.5.10
warning: `uv publish` is experimental and may change without warning
DEBUG Publishing with index pypi-publish-private
DEBUG Not a distribution filename: `.gitignore`
Publishing 2 files https://pypi-publish.my-company.com/
DEBUG Using request timeout of 900s
DEBUG Checking for my-example-package-0.1.0-py3-none-any.whl in the registry
DEBUG No cache entry for: https:/mirrors.my-company.com/pypi/simple/my-example-package/
DEBUG No netrc file found
error: Failed to query check URL
Caused by: Package `my-example-package` was not found in the registry
I am a bit confused.
- Is there something I am suppose to do before publishing the very first time?
- Since the package has never been published before isn't it expected that the package is not found in the the registry?
- Is my private registry not behaving as expected?
I was able to work around this by using twine
to upload the package the very first time. Once the package has been uploaded once then uv publish
appears to work as expected.