Reputation: 1417
I am trying to publish a package to gitlab pypi registry. What is the repository url we need to use to publish to a group package registry?.
I tried using this https://gitlab.example.com/api/v4/groups/id/packages/pypi
but it is throwing 404 now found.
The api https://gitlab.example.com/api/v4/groups/id/packages/
returns a empty array for me.
But when I manually take the registry from the UI pypy, npm etc are present.
Publishing to individual project repositories is working fine.
https://gitlab.example.com/api/v4/projects/id/packages/pypi
Upvotes: 9
Views: 4163
Reputation: 21
To anyone else coming across this thread, wanting to PULL packages from a single entrypoint; the solution is to refer to the group:
https://<GITLAB INSTANCE>/api/v4/groups/<YOUR GROUP>/-/packages/pypi/simple
That will allow you to install any package released.
Docs: https://docs.gitlab.com/ee/user/packages/pypi_repository/index.html#install-from-the-group-level
Upvotes: 2
Reputation: 146
I run into the same problem. As far as I understand, groups don't have their own registries. If you go in your group settings, you won't see the option to activate it.
Groups are only placeholders to organize projects, they don't hold any data. What you see in the UI when clicking on the group registry is the aggregation of all the registries of the projects inside that group. This is only a search UI, not a registry per se.
Bottom-line is that you have to publish your artefacts to a specific project.
Note that you can have a dedicated project to hold only your registry, and have all your code repositories publish in the same registry.
Upvotes: 13