Reputation: 1436
I am trying to create a group using Gitlab CE 12.4.3 The api token is the one generated by the admin account in Gitlab. SO this account has the permission to create groups
curl --header "PRIVATE-TOKEN: 6czXYzu1j7dD16PqtiZw" -d "name=TEST&path=test" -X POST https://mygitlabserver/api/v4/groups
{"message":"403 Forbidden"}
I get an error message saying that it is forbidden.
The token is correct as I manage to list the projects or groups if I do :
curl --header "PRIVATE-TOKEN: 6czXYzu1j7dD16PqtiZw" -X GET https://mygitlabserver/api/v4/groups
or
curl --header "PRIVATE-TOKEN: 6czXYzu1j7dD16PqtiZw" -X GET https://mygitlabserver/api/v4/projects
Upvotes: 0
Views: 1121
Reputation: 1436
the root cause is that the gitlab_rails['gitlab_default_can_create_group'] was set to false and even if I was able to create a group via the web interface via the user "Administrator", the creation was forbidden via the API. I had to change the settings for the account administrator and allow it to create a group
Upvotes: 2