Code Monkey home page Code Monkey logo

Comments (4)

devstek avatar devstek commented on June 10, 2024

You can check if Pull Request works for you. Pls leave a comment if it works.

from gitlabber.

MaxRink avatar MaxRink commented on June 10, 2024

looks like it does @devstek

from gitlabber.

MaxRink avatar MaxRink commented on June 10, 2024

Or actually it doesnt
I apparently used the wrong api key to reporduce it

2022-01-28 13:33:56,721 - urllib3.connectionpool - DEBUG - https://gitlab.devops.telekom.de:443 "GET /api/v4/groups/34573 HTTP/1.1" 404 33
Traceback (most recent call last):
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/exceptions.py", line 311, in wrapped_f
    return f(*args, **kwargs)
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/mixins.py", line 111, in get
    server_data = self.gitlab.http_get(path, **kwargs)
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/client.py", line 761, in http_get
    result = self.http_request(
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/client.py", line 727, in http_request
    raise gitlab.exceptions.GitlabHttpError(
gitlab.exceptions.GitlabHttpError: 404: 404 Group Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/gitlab_tree.py", line 122, in get_subgroups
    subgroup = self.gitlab.groups.get(subgroup_def.id)
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/v4/objects/groups.py", line 323, in get
    return cast(Group, super().get(id=id, lazy=lazy, **kwargs))
  File "/home/maxr/.local/lib/python3.10/site-packages/gitlab/exceptions.py", line 313, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabGetError: 404: 404 Group Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/__main__.py", line 2, in <module>
    main()
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/cli.py", line 43, in main
    tree.load_tree()
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/gitlab_tree.py", line 161, in load_tree
    self.load_gitlab_tree()
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/gitlab_tree.py", line 144, in load_gitlab_tree
    self.get_subgroups(group, node)
  File "/home/maxr/git/GitHub/ezbz/gitlabber/gitlabber2/gitlab_tree.py", line 125, in get_subgroups
    log.error(f"Error retrieving group {subgroup.name} (ID: {subgroup.id}): {error}. Check your permissions as you may not have access to it.")
UnboundLocalError: local variable 'subgroup' referenced before assignment

from gitlabber.

tewe avatar tewe commented on June 10, 2024

I also get "404 Group Not Found" from gitlabber 1.1.9 against GitLab 15.4.2-ee.

It first calls https://gitlab/api/v4/groups without a min_access_level. The returned JSON gives no indication which groups the authenticated user has access to. It then tries to list the subgroups of every group. GitLab uses 404 even if it means 403, probably to avoid leaking information. So boom.

from gitlabber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.