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.

Revisions

  1. huantt created this gist Jun 5, 2023.
    5 changes: 5 additions & 0 deletions clone-all-repos-in-gitlab-group.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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;