Update project pull mirroring settings
PUT
/api/v4/projects/{id}/mirror/pull
Updates pull mirroring settings for a specified project. This feature was introduced in GitLab 17.5.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Request Body
Section titled “ Request Body ” Media type application/json
object
enabled
Enables pull mirroring in a project
boolean
url
URL of the project to pull mirror
string
auth_user
The username used for authentication of a project to pull mirror
string
auth_password
The password used for authentication of a project to pull mirror or a personal access token with the api scope enabled.
string
mirror_trigger_builds
Pull mirroring triggers builds
boolean
only_mirror_protected_branches
Only mirror protected branches
boolean
mirror_overwrites_diverged_branches
Pull mirror overwrites diverged branches
boolean
mirror_branch_regex
Only mirror branches with names that match this regex
string
only_protected_branches
string
Example generated
{ "enabled": true, "url": "example", "auth_user": "example", "auth_password": "example", "mirror_trigger_builds": true, "only_mirror_protected_branches": true, "mirror_overwrites_diverged_branches": true, "mirror_branch_regex": "example", "only_protected_branches": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
id
integer format: int64
update_status
string
url
string
last_error
string
last_update_at
string format: date-time
last_update_started_at
string format: date-time
last_successful_update_at
string format: date-time
enabled
boolean
mirror_trigger_builds
boolean
only_mirror_protected_branches
boolean
mirror_overwrites_diverged_branches
boolean
mirror_branch_regex
string
Example
{ "id": 101486, "update_status": "finished", "url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git", "last_update_at": "2020-01-06T17:32:02.823Z", "last_update_started_at": "2020-01-06T17:32:02.823Z", "last_successful_update_at": "2020-01-06T17:32:02.823Z", "enabled": false, "mirror_trigger_builds": false, "only_mirror_protected_branches": false, "mirror_overwrites_diverged_branches": false, "mirror_branch_regex": "branch_name"}Url is blocked: Only allowed schemes are http, https, ssh, git
Not Found