Tool for easy cloning whole gitlab structure to your local machine.
- Free software: MIT license
- Requests
- Python >= 3.6
You can install "gitlab-clone" via pip:
$ pip install gitlab-clone
>>> gitlab-clone:
optional arguments:
-h, --help show this help message and exit
--group_id group_id Id of a group in gitlab
--branch branch Branch to clone in all repos [by default master]
--http Clone via http instead of ssh
--gitlab-url gitlab Gitlab address [by default gitlab.com]
--token token Gitlab Token
$ gitlab-clone --group=123 --token=MySecretToken --gitlab-url=gitlab.organization.com
For example if you clone this group https://gitlab.com/lmaolmaolmao which id is 6849299
you will have absolutely the same structure locally:
>>> tree
.
└── lmaolmaolmao
└── subgroup1
└── subgroup2
└── subgroup3
If you will use this command again gitlab-clone will just pull the updated to the existing repos, and will download new repos from the group.