Created: 2008-07-10 15:56
Updated: 2019-01-05 09:30
License: mit



Github-clone makes it easy to clone all github projects of a user, using either the public or private clone urls for the projects.


Clone all public repositories of user Narnach, using the public clone URLs:

github-clone Narnach

Clone all repositories of user Narnach, using the private clone URLs and suppressing console output:

github-clone Narnach -q --private

When you simply want a list of your repositories with their clone urls, that's an option too:

github-clone Narnach --dry-run --private

The output will look something like this:

Username matches github.user configuration, so using that to access private repositories.
Would clone aasterinian:
Would clone future:
Already exists: github-clone for

As you can see this accounts for your private organizations and collaborator repos as well.


When you have your github.user and github.token properly setup (howto) in your ~/.gitconfig, github-clone will use that information to fetch a list of your private repositories and clone those in addition to your public repositories.

You can find and/or setup your access tokens here. You only need the repo scope:

Ideas / todo

  • Add support to fetch/pull repositories as well as clone them. This makes automatic backups a possibility.
  • Turn this script into a proper ruby gem.
  • Add support to clone gitosis-managed repositories.


Copyright (c) 2008-2017 - Wes Oldenbeuving, released under the MIT license.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more