1

I can install my-package from the shell without providing a token, using pip install is OK:

pip install rdmacontrol --index-url https://gitlab.com/api/v4/projects/44753656/packages/pypi/simple

I am trying to automate this into my pyproject file, but can't quite get it to work. I'm aware this should work if I had a URL ending in .git, i.e.:

[project]
dependencies = [
    "my-package @ git+https://<username>:<token>@gitlab.com/<group>/<repo>.git"
]

However, my URL is different as can be seen above. I am aware that if I tried poetry, it should work without a .git URL and without providing a / (as in this post: How to add dependency in pyproject.toml from gitlab private package registry). But I'm surprised I can't find any information on solving this as in my example, without poetry. It seems like a simple problem - What am I missing?

The "my-package" is provided by a different group (who uses GitLab instead of GitHub), should I ask them to make the package accessible in a different way?

1
  • 1
    The recommended way to do things is to host the python wheel inside gitlab registry not just their source control and poetry can download from that registry. A registry's URL will end in /pypi/simple. Following Devops, separating the development from the deployment (operations). Commented Dec 5, 2025 at 4:31

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.