Skip to content
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

unable to pull package from private artifactory registry #8448

Closed
danieleades opened this issue Oct 22, 2024 · 5 comments · Fixed by #8452
Closed

unable to pull package from private artifactory registry #8448

danieleades opened this issue Oct 22, 2024 · 5 comments · Fixed by #8452
Assignees
Labels
bug Something isn't working

Comments

@danieleades
Copy link
Contributor

see discussion here - #7481 (comment)

You can use an API key in the PASSWORD variable — it works for anything that supports HTTP Basic Authentication.

thanks for the support!

i'm trying this now and seeing issues. For context, i have a project which has one dependency from a private artifactory registry.

with or without credentials exported to the environment i see the following output:

uv sync
  × No solution found when resolving dependencies:
  ╰─▶ Because my-private-package was not found in the package registry and your project depends on my-private-package>=2.0.0,<2.1.dev0, we can conclude that your project's requirements are unsatisfiable.

      hint: my-private-package was requested with a pre-release marker (e.g., sb-qag-sphinx>=2.0.0,<2.1.dev0), but pre-releases weren't enabled (try: `--prerelease=allow`)

the dependencies are specified as follows:

dependencies = [
    "my-private-package~=2.0.0",
    # ...
]

[tool.uv.sources]
my-private-package = {index = "mycompany-py-release"}

[[tool.uv.index]]
name = "artifactory-pypi"
url = "https://artifactory.mycompany.com/artifactory/api/pypi/pypi/simple"
default = true

[[tool.uv.index]]
# Requires:
name = "mycompany-py-release"
url = "https://artifactory.mycompany.com/artifactory/api/pypi/my-private-package/simple"
explicit = true

with

export UV_INDEX_MYCOMPANY_PY_RELEASE_USERNAME={username}
export UV_INDEX_MYCOMPANY_PY_RELEASE_PASSWORD={artifactory token}
@charliermarsh
Copy link
Member

Can you try using a name without dashes in it? We might not be normalizing those correctly.

@danieleades
Copy link
Contributor Author

Can you try using a name without dashes in it? We might not be normalizing those correctly.

I wondered about that. There's no documentation on how the normalisation behaves.

Unfortunately all the registries I can access easily for testing have dashes

@charliermarsh
Copy link
Member

It's fixed in the next release.

@danieleades
Copy link
Contributor Author

It's fixed in the next release.

Outstanding.

Will the normalisation behaviour be described in the docs?

@charliermarsh
Copy link
Member

Yeah, but for reference, we uppercase the index name and replace any non-alphanumeric characters with underscores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants