Separate mirroring credentials api
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
This MR separates authentication credentials used in pull mirroring from the import URL. It thereby implements proposal #465313 (closed) and provides a workaround for Bug #465311 (closed)
MR acceptance checklist
As discussed with @mbruemmer, we are opening this MR asap to avoid unnecessary work on our sides.
This MR currently lacks testing for EE features
How to set up and validate locally
- As pull mirroring is an enterprise feature, you must test this on an enterprice GitLab instance
- Check out this branch
- start GitLab with
gdk start
- Create an empty project
- Obtain the newly created projects ID
- Make an API request to add pull mirroring to the project. Here you must provide your own git repository that is protected by HTTP basic auth.
curl --location --request PUT 'http://127.0.0.1:3000/api/v4/projects/:id' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'mirror=true' \
--data-urlencode 'import_url=http://your.domain/your/repo.git' \
--data-urlencode 'import_url_user=user@domain.org' \
--data-urlencode 'import_url_password=PasswordWithSpecialCh@rs'
- Validate that pull mirroring was added and mirroring is working
Edited by 🤖 GitLab Bot 🤖