gh-dl

command module
v0.0.0-...-5c35ded Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2022 License: AGPL-3.0 Imports: 20 Imported by: 0

README

gh-dl is a GitHub archiving client. It takes a list of names, which may be
users, organizations, or repositories, to create a compressed archive of the
result.

./gh-gl [-aqsv] [-l level] [-t duration] [-x repos] name...

The -a option specifies to use oauth2 & ssh authentication to clone private
repos. This requires two steps in GitHub: first, generate a new personal access
token with the "repo" scope, then add an SSH key. The personal access token
allows discovering private repos, and the SSH key is used to clone them. When
entering the personal access token on the commandline, echoing is disabled.

The -l option specifies the gzip compression level -2 <= l <= 9. -2 for Huffman
coding, -1 for a reasonable default level, otherwise 0 (none) <= l <= 9 (best).

The -t option specifies the timeout when cloning the git repo.

The -s option specifies to recursively clone submodules.

The -q option specifies to print nothing but fatal errors. The -v option prints
more things, such as download progress and rate limit counts.

The -x option specifies a comma-separated list of repositories to exclude.

If the client is interrupted, it will leave a folder in the /tmp directory.

Example execution on the "esote" user, the "git" organization, and the
"golang/lint" repository, with authentication, and a 30s timeout (meaning large
repos are skipped).

	$ gh-dl -a -t 30s esote git golang/lint
	Personal access token:
	found 7 repos for git
	found 75 repos for esote
	error: git/git: context deadline exceeded
	downloaded 82/83 repos
	archive created: gh-dl-1610939687.tar.gz

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL