Username disappears from mirror configuration after creation
When creating a pull mirror repository for CI/CD-only (possibly in other scenarios, but this is the tested one) repositories, e.g. via https://gitlab.com/projects/new#cicd_for_external_repo, the mirror will fail to work correctly for external repositories that require authentication.
Steps to reproduce
- I have a private GitHub repository: https://github.com/robotmay/blorp.git
- I want to run the CI/CD step only on GitLab
- I use the external repo flow: https://gitlab.com/projects/new#cicd_for_external_repo
- I use the URL
https://robotmay@github.com/robotmay/blorp.git
for the repository, and a Personal Access Token in the password field - I click create, and the repository is successfully fetched, but:
- The next attempt to mirror it will fail
- I go to https://gitlab.com/robotmay/blorp/-/settings/repository and expand
Mirroring Repositories
- The repository URL is now missing the username component
Workaround
If you get to this point, you can fix the mirror by removing it and re-configuring it through the Mirroring Repositories
settings, following the same setup as before. So the repository URL should be https://robotmay@github.com/robotmay/blorp.git
and the Personal Access Token goes into the password field on the form.
/cc @sean_carroll, @vyaklushin
Edited by Sean Carroll