Protected tags API: deploy keys cannot be set for Free tier
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem
Reported here: #402238 (comment 2518813222)
Users can choose Deploy Keys to configure Protected Tags via UI.
However, an attempt to set the deploy key via API doesn't set the key.
Click to expand
% curl \
--request POST \
--header "PRIVATE-TOKEN: [MASKED]" \
--header "Content-Type: application/json" \
--url "https://[MASKED].com/api/v4/projects/3354/protected_tags" \
--data '{
"name" : "scm/*",
"create_access_level" : 40,
"allowed_to_create" : [
{ "access_level" : 40 },
{ "deploy_key_id" : 1801 }
]
}'
{
"name": "scm/*",
"create_access_levels": [
{
"id": 718,
"access_level": 40,
"access_level_description": "Maintainers",
"deploy_key_id": null
}
]
}
Proposal
API doesn't support deploy_key
setting because this configuration is limited to EE version only.
We should explore an option to allow configuring deploy_key
via API for Free tier as well.
Edited by 🤖 GitLab Bot 🤖