REST API: add an endpoint to configure pull mirrors
Problem
Currently, pull mirroring configuration is done through Projects API. This is confusing and leads to various problems.
Customer impact
It's impossible to provide username or password for Pull mirror via existing API if they contain /
character, for example.
See details: #465311 (comment 2128504641)
URL-encoding of
/
to%2F
did not work as it is never decoded before being sent to the remote repository for authentication. When doing so, we get the following error message:{ "message": "http://<REDACTED>/git/myrepo.git/ endpoint error: 401 Unauthorized" }
Proposal
-
Create a new endpoint to configure Pull Mirroring for a project. Similarly to Remote Mirrors API.
-
Deprecate pull mirror configuration via Projects API.
Edited by Vasilii Iakliushin