Import project by URL does not find valid Git Repository URL on local gitlab URLs
Upgrading past Gitlab version 16.5.1 causes URL import to throw the "There is not a valid Git repository at this URL." error on valid local URLs.
I tested on Gitlab 16.9.1 and ran into the same error when trying to import a local project using URL, import by URL throws "There is not a valid Git repository at this URL" on valid Git URL, even when creds are given. I was able to import from URL projects on gitlab.com.
The fix I found is enabling a local network setting (Allow requests to the local network from web hooks and services) that did not need to be enabled before Gitlab 16.5.1.
Access Admin settings: “Admin → Settings → Network → Outbound requests” Check “Allow requests to the local network from web hooks and services"
Steps to reproduce:
- Click New project Click Import project
- Click Repository by URL
- Fill in the project URL into the Git repository URL field with a local project URL.
- Because the project requires a user to be logged on to be visible, enter your Username in the Username field and your Personal Access Token in the Password field.
- Set the Project name
- Set Project URL, Project slug, Project Description, and Visibility Level to your preferences.
- Click Create project at the bottom of the page to proceed.
More info in #429689 (closed)
