Skip to content

After being unable to find a working method to quickly download all the projects under a github user or group, and worse; seeing implementations take ~100-150 LOC when I was able to do it in 1, at about ~25 characters

Notifications You must be signed in to change notification settings

wade-welles/backup-github-user-or-group-repositories

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

[VERY SIMPLE] Github User or Group/Organization Repository Backup


Line 13 can just be copied and pasted into your terminal, and switch out the argument $1 with the group.

#!/bin/sh

if [ -z = 1 ]; then 
  echo "[error] failed to supply name of user or group to backup\n"
  echo "  USAGE:"
  echo "    ./backup-repos.github.sh gnome"
else
  curl -s https://api.github.com/orgs/$1/repos?per_page=200 | jq -r '.[].clone_url' | xargs -n 1 git clone
fi

About

After being unable to find a working method to quickly download all the projects under a github user or group, and worse; seeing implementations take ~100-150 LOC when I was able to do it in 1, at about ~25 characters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages