Skip to content

Instantly share code, notes, and snippets.

@BhanukaUOM
Last active October 8, 2020 12:11
Show Gist options
  • Save BhanukaUOM/1fa0692d42e19c4f35142ab599efb629 to your computer and use it in GitHub Desktop.
Save BhanukaUOM/1fa0692d42e19c4f35142ab599efb629 to your computer and use it in GitHub Desktop.
Clone all GitLab Projects
#!/bin/bash
user=""
token=""
repo_list=$(curl "https://gitlab.com/api/v4/users/${user}/projects?per_page=1000&access_token=${token}" | jq .[].ssh_url_to_repo | sed -e 's/^"//' -e 's/"$//')
for repo in $repo_list
do
echo "Repo found: $repo"
git clone $repo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment