Liam Flaherty
Liam Flaherty

Reputation: 337

Download a github account

Suppose I see a Github account such as Mono with many repos in it.

What do I do to download all of the repos at once?

I don't want to have to download each zip individually.

Upvotes: 1

Views: 69

Answers (1)

VonC
VonC

Reputation: 1324577

You would have to clone all the repo of the organization Mono, they wouldn't have to be zip.

Zip or clones, there is no native way offered by GitHub to get all the repos in one click.

But, from this gist, you still can get them in one command line:

curl -s https://api.github.com/orgs/mono/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'

You can replace ssh_url by clone_url if you want to clone them using an https address.

If you really don't want to clone them, but only want to get the archive, you would have to get from that one-line the archive_url part, and tweak it to get the archive of the master branch (for example).

Upvotes: 2

Related Questions