Clone bulk git repositories

0

Is there a script that allows me to clone more than 100 git repositories at the same time? For example:

https://github.com/Geovation/wifispy/
https://github.com/wlanslovenija/wireless-info
https://github.com/stef/wireless-radar/
https://github.com/gauravpatwardhan/Wireless-Sniffer

https://github.com/jeffThompson/MappingWirelessNetworks
https://github.com/pan0pt1c0n/WAPMap
https://github.com/0x90/warcarrier
https://github.com/cyberpython/WifiScanAndMap/
https://github.com/travisgoodspeed/80211scrambler
....
    
asked by Cody Rutscher 16.10.2018 в 13:01
source

1 answer

2

Cody. Welcome to Stack Overflow in Spanish. Your question can be solved in a simple way knowing how to clone a single repository:

According to the Altassian website: link

It's as easy as git clone ssh://[email protected]/path/to/my-project.git

Well, to do it over 100 repositories, and also in a script, we would need to know something more about the script. The basic questions that come to mind are:

  • Do you want it in a bash (for linux), batch (for windows)?
  • Do you want to integrate it into a javascript or python scripting language, for example?

In Stack Overflow, in English, they offer more information on how to do it: link

I'll take out one of the scripts used:

  

This is an example of a bash script for Linux. First, all the repositories to be cloned must be put in a file. With cat, you can see all your repositories in that file. Keep in mind that you will have to do it in a clean folder, because all your repositories will be copied in that folder.

$ cat clone
https://github.com/igorsobreira/igorsobreira.com https://github.com/ella/ella https://github.com/divio/django-cms/ https://github.com/palewire/palewire.com https://github.com/jabapyth/jfcom https://github.com/humanfromearth/snippify https://github.com/scaphilo/koalixcrm https://github.com/jlev/Boycott-Toolkit https://github.com/jbalogh/zamboni/ https://github.com/ASKBOT/askbot-devel https://github.com/emesik/djiki https://github.com/vicalloy/LBForum https://github.com/agiliq/agiliq https://github.com/bartTC/dpaste.de https://github.com/bartTC/django-paste https://github.com/bartTC/dpaste_de/ https://github.com/fotochest/fotochest https://esp.mit.edu/git/esp-project.git https://github.com/titan2x/bashoneliners.git
  

Secondly, you execute the following command

$ for f in 'cat clone'; do 'git clone $f'; done 
  

And start the cloning of each and every one of the repositories to the folder you have designated.

It is not the only way, there are many more. On the OS page in English, you are given more options.

There they comment that you can have a problem with the credentials, that will repeat them to you in successive occasions. So, if you had that problem, you would have to repeat your username and password, if the repository requires it.

    
answered by 16.10.2018 / 14:53
source