Skip to content

Instantly share code, notes, and snippets.

@rom3r4
Forked from creationix/getMyCode.js
Created March 1, 2023 21:03
Show Gist options
  • Save rom3r4/bed7bc800a63d5466abb4d0095ecb334 to your computer and use it in GitHub Desktop.
Save rom3r4/bed7bc800a63d5466abb4d0095ecb334 to your computer and use it in GitHub Desktop.
Script to download all repos for a user
// Run this with node and then run the output with sh
var Http = require('http')
var ChildProcess = require('child_process');
Http.cat("http://github.com/api/v2/json/repos/show/creationix", function (err, json) {
if (err) throw err;
var data = JSON.parse(json);
data.repositories.forEach(function (repo) {
console.log("echo " + JSON.stringify(repo.name + " - " + repo.description));
console.log("git clone --bare " + repo.url);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment