Last active
October 8, 2020 12:11
-
-
Save BhanukaUOM/1fa0692d42e19c4f35142ab599efb629 to your computer and use it in GitHub Desktop.
Clone all GitLab Projects
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
#!/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