This post outlines my new tool which allows users to clone entire set of public repositories of a specific user or organization. This can also be used to create a backup of all repositories.
Github has become a new trend and people have started placing lots and lots of code on the website. So i have also been following this github trends and have pushed, cloned, forked multiple repositories. (total count of 72)
So today i wanted to create a backup of all github repositories under my account or under my organization account.I saw couple of solutions being provided here and here however most of the solutions are ruby based code.
So i thought lets see how much time and efforts it takes to write a simple python script to do the same. So here is the python version of github user/organization cloning script.
[github userid=”anantshri” repoid=”github_cloner” path=”src/github_clone_user.py” language=”python”]
Hope this can help someone.
Github details here
python -t github_clone_user.py --name anantshri --output "/tmp/test"
Also as it goes for anything publically available. It might contain errors and issues, don’t blame me if it blows your computer but if you do find ways to improve it or find better alternatives do drop a line in comments below.
P.S. at this point I needed user cloning stuff on priority so did that, organization cloning would be done but not today.
1 thought on “Cloning all github repositories of a user / organization”
Wonderful tools. I looked for such a tool for 2 hours on the Internet, most of them have bugs, different language build (lots of dependencies), etc……. And this tool solve the problem by just Python which I love.
Thank you !