How to clone entire group from self-hosted gitlab instance

You can use the glab command line tool to clone all repositories from an entire group from your self-hosted GitLab instance.

Step 1: Authenticate glab

First, you need to login to your GitLab instance using glab:

GITLAB_HOST= glab auth login

Follow the instructions to log in to your GitLab instance.

Step 2: Clone a group of repositories

In this example, we’ll close the group named MyGroup

GITLAB_HOST= glab repo clone -g "MyGroup" --archived=false -p --paginate

This comma

Note that --paginate is neccessary here in case there are more repos than fit into one page.

--archived=false means to skip cloning archived repositories. Omit this option in case you also want to clone archived repos.