Description of problem: When using a custom git servername the "Import from git"-flow tries to validate the git repository and if possible make a build strategy suggestion. If the URL doesn't contain an indicator if the git provider is one of the supported providers (at the moment GitHub, GitLab, or BitBucket) it shows a dropdown so that the user can select the git provider. If the user selects this git provider, it ignores the given servername and fetches data from the 'official public API' instead. With this, the user doesn't have the option to use an On-Premises GitLab and BitBucket installation. Version-Release number of selected component (if applicable): 4.8 Verified on 4.8, 4.9 and 4.10 (master branch, tested with fbbf49d71c73ab56d23180de9b4eb6ca3e40a94c) Don't tested older versions yet How reproducible: Always Steps to Reproduce: 1. Switch to developer perspective 2. Navigate to Add > Import from Git 3. Open the browser network inspector 4. Enter a Git URL like https://git.mycompany.com/ 5. Switch between the Git providers, if needed change the git URL to trigger a new API call Actual results: - When selecting GitHub and BitBucket the network calls always go to api.github.com and api.bitbucket.org (both wrong) - When selecting GitLab the network inspector shows an API call to git.mycompany.com (correct) Expected results: - For each provider the URL should change, but the actual request should always go to the given servername. Additional info: None
Created attachment 1849484 [details] 4.8-github-wrong-api.png
Created attachment 1849485 [details] 4.8-gitlab-right-api.png
Created attachment 1849486 [details] 4.8-bitbucket-wrong-api.png
Verified on 4.11.0-0.nightly-2022-04-24-135651 Re-tested some of the URLs from https://github.com/openshift/console/pull/10827#issuecomment-1090130677
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069