Skip to content

Instantly share code, notes, and snippets.

@jdecaron
Created July 22, 2019 19:25
Show Gist options
  • Save jdecaron/5b86cf9f89ae85e1acb6cb9409a80e34 to your computer and use it in GitHub Desktop.
Save jdecaron/5b86cf9f89ae85e1acb6cb9409a80e34 to your computer and use it in GitHub Desktop.
Clone all projects from a Gitlab group using a NodeJS interpreter
# 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)"
@jdecaron
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment