Skip to content

Instantly share code, notes, and snippets.

@FerraBraiZ
Last active June 12, 2019 15:57
Show Gist options
  • Save FerraBraiZ/e0586785400ae0230948a32c0d8eee06 to your computer and use it in GitHub Desktop.
Save FerraBraiZ/e0586785400ae0230948a32c0d8eee06 to your computer and use it in GitHub Desktop.
Shell script to clone every repo ( that u have access that is ;D ) of a github organization
#!/bin/bash
## extracted from https://askubuntu.com/questions/976145/shell-script-to-clone-every-repo-of-a-github-organization
## original author is in the post, all credits goes to him/her/it
for i in $(curl "https://api.github.com/orgs/[organization]/repos?access_token=[access_token]" | sed '/[ ]*"clone_url":/!d;s/[^:]*: "//;s/",$//'); do
echo git clone $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment