Skip to content

Instantly share code, notes, and snippets.

@huantt
Created June 5, 2023 14:35
Show Gist options
  • Save huantt/32b099795d9c30a196d05a2ca113910c to your computer and use it in GitHub Desktop.
Save huantt/32b099795d9c30a196d05a2ca113910c to your computer and use it in GitHub Desktop.
Clone all repositories in a gitlab group
host=https://git.your-domain.com \
session="a04dbb20e2c00433b3a5b137bc2c9b5c" \
group="your-group" \
api="$host/api/v4/groups/$group"
for repo in $(curl -s --header "cookie: _gitlab_session=$session" $api | jq -r ".projects[].ssh_url_to_repo"); do git clone $repo; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment