Publishing to gitlab pypi package registry for a group

Viewed 885

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

1 Answers

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.

Related