Skip to content

uv publish does not recognize UV_INDEX_{name}_PASSWORD and UV_INDEX_{name}_USERNAME #10386

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

Closed
SalttownUser opened this issue Jan 8, 2025 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@SalttownUser
Copy link

I have an issue using the uv publish command. I'm trying to upload a package to a private GitLab package registry and getting check error.

The index url is a GitLab group url combining packages inherited from multiple projects in the group:

[[tool.uv.index]]
name = "gitlab-private"
url = "https://example.org/api/v4/groups/1/packages/pypi/simple"
default = true
publish-url = "https://example.org/api/v4/projects/2/packages/pypi"

I did use these environment variable with credentials for url:

UV_INDEX_GITLAB_PRIVATE_PASSWORD
UV_INDEX_GITLAB_PRIVATE_USERNAME

and

UV_PUBLISH_USERNAME
UV_PUBLISH_PASSWORD

containing the credentials to push packages to publish-url.

uv publish --index gitlab-private -v
DEBUG uv 0.5.11 (c4d0caaee 2024-12-19)
warning: `uv publish` is experimental and may change without warning
DEBUG Publishing with index gitlab-private
DEBUG Not a distribution filename: `.gitignore`
Publishing 6 files https://example.org/api/v4/projects/2/packages/pypi
DEBUG Using request timeout of 900s
DEBUG Checking for my_package-py3-none-any.whl in the registry
DEBUG No cache entry for: https://example.org/api/v4/projects/2/packages/pypi/simple/my_package/
DEBUG No netrc file found
error: Failed to query check URL
  Caused by: Package `my_package` was not found in the registry

When I add the credentials for index to the url with url = "https://user:[email protected]/api/v4/groups/1/packages/pypi/simple" everything works.

Expected behavior

uv publish should use UV_INDEX_{name}PASSWORD and UV_INDEX{name}_USERNAME to
authenticate with the index "name" to check the package dependencies.

Originally posted by @SalttownUser in #9775

@charliermarsh
Copy link
Member

I believe this is the same as #9845?

@charliermarsh charliermarsh added the duplicate This issue or pull request already exists label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants