Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.44 KB

File metadata and controls

55 lines (36 loc) · 1.44 KB

Bitbucket / Github Cloner

A simple script to download repos from bitbucket (mostly) and github. If the repository already exists the repository will just be updated if possible via git pull.

github.sh

Requirements

  1. GitHub CLI installed and configured to access your repositories

usage

sh github.sh <desired clone path>
example
sh github.sh ~/work/github_repos

During the execution the script will pause to allow for editing of the list of repositories to clone. Often with large organizations is possible to have quite a large number of repositories to clone, which is most of the times unwanted.

Also, if the you already run the script the script will prompt whether you want to just keep reading from the existing list file so that the script will just attempt updating of those repositories.

Result

The script will create folders per each organization and username, under which the repositories will be cloned.

bitbucket.sh

Requirements

jq: [https://stedolan.github.io/jq/]

usage

bitbucket.sh username:password

result

it will create a bitbuckt_repos folder above the script itself and a number of subfolders depending on your own bitbucket structure. Inside each folder your repos are going to be cloned.

Inspired by this: [https://stackoverflow.com/questions/40429610/bitbucket-clone-all-team-repositories]