Skip to content

Clear our import data credentials when adding new mirrors

Stan Hu requested to merge sh-fix-project-mirrors-mix-http-ssh-creds into master

This fixes a bug that happened when you did the following:

  1. Create a new project
  2. Add a new pull mirror with SSH public key credentials
  3. Delete the pull mirror
  4. Add a new pull mirror with an HTTPS password

Because credentials are always merged into the existing values in the existing ProjectImportData, the credentials would always stick as ssh_public_key instead of password.

This change ensures that the credentials are cleared each time a new mirror is created.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55729

CE backport: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24373

Edited by Stan Hu

Merge request reports