Failing to import projects from GitLab.com that is integrated to a SM instance
Summary
After integrating the Self-managed instance with Gitlab.com following our docs, trying to import projects from GitLab.com fails, showing no importable projects.
On UI, we get Requesting your Gitlab repositories failed
.
Ticket Link (Internal): https://gitlab.zendesk.com/agent/tickets/250273
Steps to reproduce
With a user that has projects on GitLab.com where they have owner or maintainer access:
- Integrate a Self-managed instance with Gitlab.com.
- Import projects from GitLab.com
- You would get the error on UI
Requesting your Gitlab repositories failed
Example Project
What is the current bug behavior?
No importable projects are listed
What is the expected correct behavior?
The list should have all projects in which the user has owner or maintainer access.
Relevant logs and/or screenshots
On UI:
While the log file has the error:
NoMethodError (undefined method `[]' for #<Enumerator: #<Enumerator::Generator:0x00007f9eda982cb0>:each>)
Output of checks
Results of GitLab environment info
Omnibus installation:
- The customer reporting it has version 14.3.4
- We tested this on version 14.5
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
The workaround would be using the regular export/import method through the UI or using Project import/export API