Clear our import data credentials when adding new mirrors
This fixes a bug that happened when you did the following:
- Create a new project
- Add a new pull mirror with SSH public key credentials
- Delete the pull mirror
- 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