Installing GitLab dependency without username/token

1 day ago 8
ARTICLE AD BOX

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?

Read Entire Article