GitLab & Runner

Clone all projects from a group in GitLab

  1. Install glab utility with the following command:

brew install glab
  1. Create a https://gitlab.example.com/-/profile/personal_access_tokens?name=glab&scopes=api,write_repository token with the following scopes:

    1. api

    2. write_repository

  2. Login with the following command:

$ glab auth login --hostname gitlab.example.com
? Paste your authentication token: **************************
? Choose default Git protocol: SSH
? Choose host API protocol: HTTPS
  1. Clone all repositories with the following command:

GITLAB_HOST=https://gitlab.example.com \
glab repo clone --group {groupName} \
--preserve-namespace --paginate

Last updated