Mirror importing by URL should not wait on request without credentials
Summary
When importing a private/internal project via URL, the import appears to hang if credentials are not properly supplied. A user would expect this not to happen and a failed authentication error would be returned, but instead it waits and times out.
This happens because when credentials are not supplied, authentication is interactive. Since the import process cannot handle the interactive authentication, it waits because as far as it "knows" the import request is still running.
Reported by a customer in this ticket: https://gitlab.zendesk.com/agent/tickets/159103 (internal link)
Steps to reproduce
We can replicate this by creating a new project, then attempting to create a new pull mirror without supplying credentials.
Here's a private project that you can use to test: https://gitlab.com/philbz/another_demo.git
To see the problem, create the mirror using that URL exactly as it is, click "Mirror repository", and watch the progress.
You can also try to clone the same project locally (i.e. on your own command line) to see the interactive authentication process that holds up the import.
Example Project
This behavior shows up in authenticated settings viewable by the owner or other members of a project, so I don't think this applies. I included screenshots below.
Relevant logs and/or screenshots
Possible fixes
We should do some sort of validation to ensure that a request made with a given URL will not hang while waiting on authentication.
This may be difficult in some scenarios, but it should be fairly easy on GitLab.com projects - prior to running the "real" import, validate the URL for credentials. If it does not contain any, we can make an unauthenticated test request to that repository and verify that the next stage is not an interactive login.