uv: Can't resolve a package version from private gitlab package index

I have a dependency managed with poetry, uploaded to a private gitlab package index. In a dependant uv project I try to add it:

$ uv add --index ${GITLAB_INDEX} livity-airtable

× No solution found when resolving dependencies: ╰─▶ Because there are no versions of livity-airtable and your project depends on livity-airtable, we can conclude that your project’s requirements are unsatisfiable.

hint: livity-airtable was found on ${GITLAB_INDEX}, but not at the requested version (all versions of livity-airtable). A compatible version may be available on a

The message doesn’t make it easier (package found but couldn’t match version, even though I didn’t request any); running with -v doesn’t give any useful information. Both projects are pure python and have exactly the same Requires-Python: >=3.11,<3.12

$ uv --version uv 0.5.4

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 61 (26 by maintainers)

Commits related to this issue

Most upvoted comments

I’m just not sure these three values are all we’ll ever need and I find such usage unintuitive. Doesn’t need to be ‘github’| ‘gitlab’, can be ‘try-unauthenticated-first’ or any descriptive value.

Anyway, I should stop arguing, I don’t commit or contribute in this project. I’ll just drop this

Cheers

edit: I don’t commit or contribute, other than that documentation I intend to do

It’s still not work for me, the package, utensils, I’m pretty sure it’s in my private repository, I tried three strategies of uv and tried to specify the version of the package, but it still didn’t work. Anyone give me some advice please 😭

RUST_LOG=uv=trace uv add utensils==0.1.58 --index-url=https://pypi.org/simple --extra-index-url=https://username:password@100.64.0.1:8000/simple --allow-insecure-host=100.64.0.1 --index-strategy unsafe-best-match -vn

TRACE Received package metadata for: greenlet
TRACE Using preference greenlet 3.1.1
TRACE No cache entry exists for /var/folders/zj/82cyd56j3t7cdf54m857wsgw0000gn/T/.tmpDV0OtY/wheels-v3/index/e367fd55faf540ee/greenlet/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.msgpack
DEBUG No cache entry for: https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Sending fresh HEAD request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Handling request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl is unauthenticated, checking cache
TRACE No credentials in cache for URL https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Attempting unauthenticated request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE cached request https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl is storable because its response has a heuristically cacheable status code 200
TRACE Getting metadata for greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl by range request
TRACE Handling request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl is unauthenticated, checking cache
TRACE No credentials in cache for URL https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Attempting unauthenticated request for https://pypi.org/simple/pypi/web/packages/7d/ec/bad1ac26764d26aa1353216fcbfa4670050f66d445448aafa227f8b16e80/greenlet-3.1.1-cp312-cp312-macosx_11_0_universal2.whl
TRACE Received built distribution metadata for: greenlet==3.1.1
  × No solution found when resolving dependencies for split (python_full_version == '3.12.*'):
TRACE Resolver derivation tree before reduction
  root==0a0.dev0 depends on shredder-demo*
      shredder-demo==0.1.0 depends on utensils==0.1.58
      no versions of utensils==0.1.58
    no versions of shredder-demo<0.1.0 | >0.1.0
TRACE Resolver derivation tree after reduction
  shredder-demo==0.1.0 depends on utensils==0.1.58
  no versions of utensils==0.1.58
  ╰─▶ Because there is no version of utensils==0.1.58 and your project depends on utensils==0.1.58, we can conclude that your project's requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.