Skip to content

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

  1. As pull mirroring is an enterprise feature, you must test this on an enterprice GitLab instance
  2. Check out this branch
  3. start GitLab with gdk start
  4. Create an empty project
  5. Obtain the newly created projects ID
  6. 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'
  1. Validate that pull mirroring was added and mirroring is working
Edited by 🤖 GitLab Bot 🤖

Merge request reports