We are trying to use the group PyPI package registry recently introduced in GitLab v14, but we are unable to get the API to work. Following the endpoints listed in the related documentation yields 404 not found errors when trying to publish (or retrieve) packages from the group PyPI registry. Publishing to and downloading from projects’ registries works just fine, however, and I am able to view the packages published to projects in a group via https://gitlab.example.com/api/v4/group/<group id>/packages
.
In other words, the following works:
$ twine upload --repository-url https://gitlab.example.com/api/v4/projects/<project id>/packages/pypi somepackage.tar.gz
$ curl https://gitlab.example.com/api/v4/projects/<project id>/packages/pypi/simple/somepackage
$ curl https://gitlab.example.com/api/v4/group/<group id>/packages
The following yield 404 errors:
$ twine upload --repository-url https://gitlab.example.com/api/v4/groups/<group id>/-/packages/pypi somepackage.tar.gz
$ twine upload --repository-url https://gitlab.example.com/api/v4/groups/<group id>/packages/pypi somepackage.tar.gz
$ curl https://gitlab.example.com/api/v4/groups/<group id>/packages/pypi/simple/somepackage
$ curl https://gitlab.example.com/api/v4/groups/<group id>/-/packages/pypi/simple/somepackage
This was attempted both from a CI job with a CI job token and manually with an Owner account’s personal access token with read/write API permissions with the same results.
Is there something we are missing when trying to use group level PyPI registries? It seems like the API is still on an older version even though GitLab (Ubuntu Omnibus installation) was updated to v14.
$ curl https://gitlab.example.com/api/v4/version
{
"version": "14.0.5-ee",
"revision": "b044f06e4dd"
}
Thanks for your help!