Run like so:
chmod u+x gist-clone-all
./gist-clone-all username OAUTH_TOKEN
You'll want to replace “username” with your own username and “OAUTH_TOKEN” with an OAuth token.
This script clones using the push URL, so you should probably be the owner of the gists. You could also use this to clone someone else's gists, but in that case you may wish to edit the code to use gist_pull_url
instead.
The error:
Is due to a invalid token.
If you add a log to the GIST object:
It comes with the GitHub message:
My solution was to generate another token with more permissions.
Great stuff, many thanks!