GitLab import not working (OD-1286)
Bastian Bohac opened 3 years ago

When I try to import our projects from GitLab, nothing is imported.

I created a Personal Access Token with scopes "read_api", "read_user" and "read_repository" as requested in the UI. I also tested the API URL plus access token with Postman. There I receive results. When I move on to step two of the import process in the 1dev UI and try to select a group, no groups are loaded at all. If I leave the group empty, check "Import All Projects" and set the needed values in step three, after clicking "Import", the popup tells me that projects were imported successfully which is not the case.

  • Robin Shen commented 3 years ago

    I tested with gitlab.com and it works as expected.

  • Bastian Bohac commented 3 years ago

    Ah, too sad. I'll try the same. Thank you for your test.

  • Robin Shen commented 3 years ago

    Let me know the reproducing steps if you can not get through it.

  • Bastian Bohac commented 3 years ago

    You're right, from gitlab.com it's working properly. So maybe our GitLab version is outdated and we will have to perform an upgrade before we're able to import our projects.

    Thank you for your support.

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 3 years ago

    Closing now. Feel free to reopen if you still have problems importing after upgrade.

  • Bastian Bohac changed state to 'Open' 3 years ago
    Previous Value Current Value
    Closed
    Open
  • Bastian Bohac commented 3 years ago

    Hey Robin,

    I now have updated our GitLab installation to the latest version (15.10.x) and retried to import our projects in 1dev. Sadly still the same behavior can be observed -> no groups are loaded and nothing gets imported. Is there a place to find more information what is going on during the import?

  • Robin Shen commented 3 years ago

    Please run below command to see if it works (replace <gitlab access token> and <gitlab root url> with your own):

    curl -H "Private-Token: <gitlab access token>" "<gitlab root url>/api/v4/groups?owned=true&top_level_only=true"
    

    If not, try this:

    curl -H "Authorization: Bearer <gitlab access token>" "<gitlab root url>/api/v4/groups?owned=true&top_level_only=true"
    
  • Bastian Bohac commented 3 years ago

    Both commands return nothing. If I strip it down to just "groups" without owned and top_level the JSON returned looks appropriate. So I have a rights problem here?

  • Robin Shen commented 3 years ago

    Yes, that is true. It expects to list groups you owned, not groups you are an oridinary member of.

    Listing groups you are part of is problematic for large installation, for instance, on gitlab.com, it will list all public groups in the system.

  • Bastian Bohac commented 3 years ago

    Well, that makes perfect sense. So all the time, this was my only problem. Maybe it would be worth to mention this fact in the docs?

    Guess, this request can now finally be closed.

    Thank you very much for your help and patience!

  • Robin Shen changed state to 'Closed' 3 years ago
    Previous Value Current Value
    Open
    Closed
  • Robin Shen commented 3 years ago

    No problem. Will update the docs to mention this.

issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
8.0.14
Issue Votes (0)
Watchers (5)
Reference
OD-1286
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover