This directory contains scripts that can be used to fetch repositories. Below are the details of each script along with examples of how to invoke them and their required/optional arguments.
This script fetches all repositories from a GitHub organization.
./github.sh <organization_name>
This script fetches all repositories from the specified GitHub organization.
- You must also have the GitHub CLI installed.
- You must either have run
gh auth login
or set theGITHUB_TOKEN
environment variable for authentication.
(Note: if you use a GitHub installation rather than github.com
you will have to gh auth login --hostname github.mycompany.com
)
To fetch all repositories from a GitHub organization:
./github.sh my-organization
This script fetches all repositories from a Bitbucket Data Center instance.
./bitbucket-data-center.sh <bitbucket_url>
This script fetches all repositories from the specified Bitbucket Data Center URL. If the AUTH_TOKEN
environment variable is set, it will be used for authentication.
To fetch all repositories from a Bitbucket Data Center instance:
AUTH_TOKEN=YOUR_TOKEN ./bitbucket-data-center.sh https://my-bitbucket.com/stash
This script fetches all repositories from a Bitbucket Data Center instance.
./bitbucket-cloud.sh -u username -p password <workspace>
This script fetches all repositories from the specified Bitbucket Data Center URL. If the AUTH_TOKEN
environment variable is set, it will be used for authentication.
To fetch all repositories from a Bitbucket Data Center instance:
./bitbucket-cloud.sh -u YOUR_USERNAME -p APP_PASSWORD myworkspace
This script fetches all repositories from a GitLab instance or a specific group within a GitLab instance.
./gitlab.sh [-g <group>] [-h <gitlab_domain>]
This script fetches all repositories from a GitLab instance or a specific group within a GitLab instance. The AUTH_TOKEN
environment variable must be set for authentication. The -g
option specifies a group to fetch repositories from. The -h
option specifies the GitLab domain (defaults to https://gitlab.com
if not provided).
To fetch all repositories from a specific group on a custom GitLab domain:
AUTH_TOKEN=YOUR_TOKEN ./gitlab.sh -g my-group -h https://my-gitlab.com