git-archive-daemon is a scalable, high-performance HTTP API for serving archives of git repositories.
git archive tool for actual archive generation.
- Laziness - Archives are generated on demand, when they're requested.
- Caching - Requests for the same combination of tree, prefix and format are served from a disk cache.
- Work pooling - Archiving is done by workers from a configurable, fixed size pool. This allows for putting predictable, limited load on the machine.
- Request grouping - When the archive is not cached then all requests for it are grouped together, waiting for the single archiving job to complete. This avoids duplicate work and allows git-archive-daemon to handle high volume of requests.
Currently you need Go development environment to build git-archive-daemon.
The following command will fetch the package and build the binary at
go get gitorious.org/gitorious/git-archive-daemon
-r <repos-dir>- Directory containing git repositories, defaults to "."
-c <cache-dir>- Cache dir for storing archives, defaults to "."
-t <tmp-dir>- Tmp dir for archive generation, defaults to system tmp dir
-l <[addr]:port>- Address/port to listen on, defaults to 127.0.0.1:5000
-w <workers>- Number of workers, defaults to 10
git-archive-daemon -r /var/git/repositories -c /var/cache/archives -l :80
ref- branch/tag name or commit sha
format- tar.gz or zip
prefix- (optional) prepended to each filename in the archive (passed to
filename- (optional) filename for the response, returned in
Content-Disposition: attachmentHTTP header.
This will generate and send tar.gz archive of master branch of repository at
git-archive-daemon is free software licensed under the GNU Affero General Public License. git-archive-daemon is developed as part of the Gitorious project.