For security reasons, the `url` attribute will always be scrubbed of username
For security reasons, the `url` attribute will always be scrubbed of username
and password information.
and password information.
## Create a remote mirror
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/24189) in GitLab 12.9.
Create a remote mirror for a project. The mirror will be disabled by default. You can enable it by including the optional parameter `enabled` when creating it:
| `url` | String | yes | The URL of the remote repository to be mirrored. |
| `enabled` | Boolean | no | Determines if the mirror is enabled. |
| `only_protected_branches` | Boolean | no | Determines if only protected branches are mirrored. |
Example request:
```sh
curl --request POST --data"url=https://username:token@example.com/gitlab/example.git"--header"PRIVATE-TOKEN: <your_access_token>"'https://gitlab.example.com/api/v4/projects/42/remote_mirrors'