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.11.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.11-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: githubtakeout-0.1.11.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.11.tar.gz
Algorithm Hash digest
SHA256 940e0170abb63c7a8e7a28a034dc8323569d46ff4dca871c54573a53a93ae363
MD5 ac7add47f3e4d8174b0d6046aaabea2a
BLAKE2b-256 882d7a87003a5ce06588ad5049e86e2a8becaad679a2f0dfbf09a6b0e3c0ebdb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: githubtakeout-0.1.11-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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e0cee9bb9f3f4343524e8d78153d7c18896a96d1a0341238c7e45820c31ef190
MD5 d83306a683b8e1cc3daadc512e8e00ac
BLAKE2b-256 de0c3d83bce83ecad5f83bbb32bc0cea13e03fe460154c121c59140e9fe0abd9

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