Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot clone subgroups #159

Closed
softbless1 opened this issue Oct 22, 2021 · 9 comments · Fixed by #400
Closed

Cannot clone subgroups #159

softbless1 opened this issue Oct 22, 2021 · 9 comments · Fixed by #400

Comments

@softbless1
Copy link

refer to issue #88 i tried the latest version, this issue is still there

i'm using this command :
ghorg clone all-groups --base-url=http://code.xyz.com --scm=gitlab --token=abc123 --preserve-dir --insecure-gitlab-client --output-dir=/root/backup

the error message saying :
Encountered an error, aborting
error fetching repos for group 'chopstick', error: group 'chopstick' does not exist

note : chopstick is a subgroup and has 2 repositories

@gabrie30
Copy link
Owner

Wasn't able to replicate this with the latest version of gitlab

Is chopstick a subgroup of a top level group?

What version of gitlab are you using?

Does your token have the correct permissions?

@softbless1
Copy link
Author

hi @gabrie30 yes, chopstik is a subgroup of a top level group. ok let me upgrade my gitlab latest version. and test it there, will update the result in here.

@tiurlumbangaol
Copy link

i've upgraded the gitlab version, and the issue is gone. thanks @gabrie30

@gabrie30
Copy link
Owner

@tiurlumbangaol what version of gitlab were you running before the upgrade?

@avelino
Copy link

avelino commented Nov 25, 2021

I am having the same problem using
GitLab12.0.3 (08a51a9db93)
GitLab Shell9.3.0
GitLab Workhorsev8.7.0
GitLab APIv4
Ruby2.6.3p62
Rails5.1.7
PostgreSQL

@gabrie30
Copy link
Owner

Thanks @avelino are you having issues with ghorg clone all-groups specifically?

It looks like from their changelog the api calls ghorg uses were introduced in 13.0.1+ Groups API has top_level_only option to exclude subgroups

I'll wait for you to confirm before updating the README.md

@avelino
Copy link

avelino commented Nov 26, 2021

Thanks @avelino are you having issues with ghorg clone all-groups specifically?

ghorg clone all-groups --base-url=http://gitlab.xxx.xxx.xxx/ --scm=gitlab --token=xxx
gitlab.xxx.xxx.xxx

 +-+-+-+-+ +-+-+ +-+-+-+-+-+
 |T|I|M|E| |T|O| |G|H|O|R|G|
 +-+-+-+-+ +-+-+ +-+-+-+-+-+

*************************************
* SCM           : gitlab
* Type          : org
* Protocol      : https
* Location      : /Users/thiago.avelino/ghorg/
* Concurrency   : 25
* Base URL      : http://gitlab.xxx.xxx.xxx/
* Config Used   : /Users/thiago.avelino/.config/ghorg/conf.yaml
*************************************

fetching repos for group: aeon-manager
Encountered an error, aborting
error fetching repos for group 'aeon-manager', error: group 'aeon-manager' does not exist

@gabrie30
Copy link
Owner

gabrie30 commented Nov 27, 2021

Thanks @avelino I've update the readme and examples to note the version requirements. Cloning groups/subgroups individually should still work for you. Can re-open if thats not the case.

@stxpons
Copy link

stxpons commented Feb 16, 2023

Thanks @avelino I've update the readme and examples to note the version requirements. Cloning groups/subgroups individually should still work for you. Can re-open if thats not the case.

I think maybe you should use /groups/${groupId}/projects instead of /groups/${groupName}/projects.
I had tested on our gitlab server, when use ${groupName}, it will cause 404 error while the group is a subgroup[like parentGroup/subGroup].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants