Skip to content

Pure bash script to clone recursively repositories from a Gitlab group

Notifications You must be signed in to change notification settings

afreyermuth98/clone-gitlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

clone-gitlab

clone-gitlab.sh is a pure bash script that will clone recursively all repositories from a Gitlab group

Disclaimer : It only works with HTTPS

Prerequisites

You need to have an API token

Usage

Manual

clone-gitlab.sh host group_id token token_name

Docker

docker run -v ${PWD}:/script docker.io/anthonymmk/clone-gitlab <GITLAB_HOST> <GROUP_ID> <TOKEN> <TOKEN_NAME>

Examples

For example, let's imagine you have a parent group (ID = 222) with this structure :

|- parentgroup
   |-- kidgroup1
   |   |-- repository1
   |   |-- repository2
   |   └-- repository3
   └-- kidgroup2
       |-- kidgroup2-1
       |   |-- repository4
       |   |-- repository5
       └-- kidgroup2-2
           |-- repository6

Manual

$ ./clone-gitlab.sh gitlab.com 222 glpat-tOkEnToKeNtOkEnToKen clone_token

Docker

docker run -v ${PWD}:/script docker.io/anthonymmk/clone-gitlab gitlab.com 222 glpat-tOkEnToKeNtOkEnToKen clone_token

About

Pure bash script to clone recursively repositories from a Gitlab group

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published