Created
July 22, 2019 19:25
-
-
Save jdecaron/5b86cf9f89ae85e1acb6cb9409a80e34 to your computer and use it in GitHub Desktop.
Clone all projects from a Gitlab group using a NodeJS interpreter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One liner to clone all your group projects | |
# with a NodeJS interpreter. You need to substitute | |
# two things in this one liner: group, token. | |
curl -s https://gitlab.com/api/v4/groups/group/projects?private_token=token&search=&per_page=999 > gitlab.json && node -e "const repos = require('./gitlab.json'); const { execSync } = require('child_process'); repos.reduce((previous, repo) => { execSync('git clone ' + repo.ssh_url_to_repo); }, undefined)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Formatted JavaScript: https://gist.github.com/jdecaron/4908c3b8049b3eb02d0295f46b5eb193