GitLab importing repositories from GitHub shouldn't result in 500 error
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label. For the Community Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=bug For the Enterprise Edition issue tracker: - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=regression - https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=bug and verify the issue you're about to submit isn't a duplicate. ---> ### Summary When trying to import repositories from GitHub, the attempt results in `502` HTTP error. ### Steps to reproduce * click `+` (to the left of the search field at the top) * choose `New Project` * `Import Project` * Pick `GitHub` **NOTE** This might be somehow related to my GutHub account only but I don't have a way to confirm that it works for any other account at the moment. If you've authorised GitLab to access your GutHub account then, after a while, you'll probably get `502` right away. In case you haven't authorised GitLab to access your GitHub account yet, 2 scenarios lead to the same `502`: * Click the first of two "List your GitHub repositories" buttons. This will bring you to the "Authorise application" screen at GutHub. After authorising GitLab to access your GutHub account, after some time, the import results in `502`. * Another way leading to the same result: * Go to [Personal access token](https://github.com/settings/tokens/new) page at GitHub and generate a new `repo` token for "Full control of private repositories" * Copy the token * Back at GitLab, paste the token into "Personal Access Token" input field and click "List your GitHub repositories" button next to it. After some time it resolves into `502`. ### What is the current *bug* behavior? Anyhow I try to import repositories from GitHub, it resolves into `502` HTTP error. ### What is the expected *correct* behavior? Probably a list of GitHub repositories where I pick the ones to import to GitLab. ### Output of checks This bug happens on GitLab.com ### Possible workaround Create a new GitHub account and share the specific projects you want to import into GitLab with that GitHub user. Then use the new GitHub account to import the projects you want into GitLab. ### Related Support Tickets (internal) - https://gitlab.zendesk.com/agent/tickets/112996 - https://gitlab.zendesk.com/agent/tickets/113675 - https://gitlab.zendesk.com/agent/tickets/129094
issue