Skip to content

Instantly share code, notes, and snippets.

@dracco1993
Last active April 15, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dracco1993/245f33cf6286d8ab27d55cb34b40d191 to your computer and use it in GitHub Desktop.
Save dracco1993/245f33cf6286d8ab27d55cb34b40d191 to your computer and use it in GitHub Desktop.
Close all repos using a personal access token
#!/bin/bash
ORG=organization;
ACCESS_KEY=0000000000000000000000000000;
for i in $(curl "https://api.github.com/orgs/$ORG/repos?access_token=$ACCESS_KEY&per_page=1000" | 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