Skip to content
/ gh-dl Public

gh-dl is a GitHub archiving client.

License

Notifications You must be signed in to change notification settings

esote/gh-dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

gh-dl is a GitHub archiving client.

Resources

License

Stars

Watchers

Forks

Languages