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.
I tried. It works. The environment is ubuntu 16.04 64bit.
First of all, you should install nodejs.
Then you should generate a ssh public key and add it to you github account.
Finnally, retry the script to sync your gists.
Cool job. Thanks!