Skip to main content

Archive public Git Repos and Gists from GitHub

Project description

githubtakeout

Archive Git Repos and Gists from GitHub



About:

githubtakeout is a data export tool for archiving Git repositories hosted on GitHub. It clones a user's repos and creates an archive of each.

It supports public/private repos and public/secret gists. By default, it doesn't save commit history or branches (.git directory), or Gist repositories (both can be enabled with command line options).

When you run the program, archives of your repos will be saved in a directory named backups inside your current working directory, unless a different location is specified using the --dir option.

Archives are saved in compressed zip format (.zip) by default, but can also be saved as tarballs (.tar.gz) using the --format=tar option.

Requirements:

Installation:

Install from [PyPI][pypyi-githubtakeout]:

pip install githubtakeout

Authentication:

By default, githubtakeout will only retrieve an account's public repos. To access private repos and secret gists, you need to authenticate.

First, you must create a personal access token on Github (either a fine-grained or classic personal access token). Once you have a token, you can set the GITHUB_TOKEN environment variable:

$ export GITHUB_TOKEN=<access token>

If you prefer to be prompted for your token each time you run the program, use the --token argument.

CLI Options:

usage: githubtakeout [-h] [--dir DIR] [--format {tar,zip}] [--gists] [--history] [--list] [--token] username

positional arguments:
  username            github username

options:
  -h, --help          show this help message and exit
  --dir DIR           output directory (default: ./)
  --format {tar,zip}  archive format (default: zip)
  --gists             include gists
  --history           include commit history and branches (.git directory)
  --list              list repos only
  --token             prompt for auth token

Usage Examples:

Install from PyPI with pipx, Run:

pipx install githubtakeout
githubtakeout <github username>

Clone Repo, Create/Activate Virtual Environment, Install from Source, Run:

git clone git@github.com:cgoldberg/githubtakeout.git
cd ./githubtakeout
python3 -m venv venv
source venv/bin/activate
pip install .
githubtakeout <github username>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

githubtakeout-0.1.9.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

githubtakeout-0.1.9-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file githubtakeout-0.1.9.tar.gz.

File metadata

  • Download URL: githubtakeout-0.1.9.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for githubtakeout-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e74260d4bd5913872a4fdd7c9bb5354a2177e104b80f4e143f19a7bfe5f90c48
MD5 6438f0739a14b132a1ae1f414dadc32f
BLAKE2b-256 d858198c1b7e0657322a0f0b74a70384c0302bea3243c969aa28990659fc51be

See more details on using hashes here.

File details

Details for the file githubtakeout-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: githubtakeout-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for githubtakeout-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 2a9840a5fd2faf8fc64d6a0cd889b300193f28d44f7691cc248971054d6c1512
MD5 bfe02009e7c28fe0aa77f9d687fbdde3
BLAKE2b-256 e6c5261c291966093ceeef6b9ea0fad5b61f1086cad3fffcfeb4e2189efe5c41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page