diff options
Diffstat (limited to 'doc/api/projects.md')
-rw-r--r-- | doc/api/projects.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md index 1c162e0bbd3..03440f0c143 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -2417,6 +2417,18 @@ Read more in the [Project import/export](project_import_export.md) documentation Read more in the [Project members](members.md) documentation. +## Configure pull mirroring for a project **(STARTER)** + +> Introduced in [GitLab Starter](https://about.gitlab.com/pricing/) 11.2. + +Configure pull mirroring while [creating a new project](#create-project) or [updating an existing project](#edit-project) using the API if the remote repository is publicly accessible or via `username/password` authentication. In case your HTTP repository is not publicly accessible, you can add the authentication information to the URL: `https://username:password@gitlab.company.com/group/project.git`, where password is a [personal access token](../user/profile/personal_access_tokens.md) with the API scope enabled. + +The relevant API parameters to update are: + +- `import_url`: URL of remote repository being mirrored (with `username:password` if needed). +- `mirror`: Enables pull mirroring on project when set to `true`. +- `only_mirror_protected_branches`: Set to `true` for protected branches. + ## Start the pull mirroring process for a Project **(STARTER)** > Introduced in [GitLab Starter](https://about.gitlab.com/pricing/) 10.3. |