Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A minimal Git HTTP server

Project Description

A minimal, “single-serving” Git HTTP server for

  1. Emergencies
  2. Local, ad hoc experimentation
  3. Git education

Normal, everyday use is not recommended unless security and performance are non-issues. Requires a normal Git installation.

There’s really no need to git clone or pip install since this thing is a single file. See --help for available options like basic auth, create-on-clone, create-on-push, SSL/TLS, etc.


Use case
Some VM or container in which SSH/NFS/SMB aren’t desired and for which folder sharing or volume mapping aren’t worth configuring
On the host
laptop:~$ curl -L "$github_raw_url" | python3 - ./www &
Serving over port 8000 ...
On the client
[my_vm]# git clone http://laptop.local:8000/repos/my_repo.git
Cloning ...
Some caveats
  1. Your network setup might require that you provide an IP address (likely of a virtual bridge) in place of localhost or laptop.local. Export that (or as _HOST to the server’s environment.

  2. The $GIT_DIR (.git folder or bare repo) being cloned must reside 2+ levels below the “document root” (~/www in the example above). If that’s a problem, export _FIRST_CHILD_OK=1 or make a dummy tree and nest a link to the repo:

    ├── www/
    │   └── repos/
    │       └── my_repo.git -> ../../my_repo/.git
    └── my_repo/
        └── .git/
  3. Non-bare repos must have the receive.denyCurrentBranch option set to updateInstead in order to receive updates (pushes) and update the working directory

    laptop:my_repo$ git config --add receive.denyCurrentBranch "updateInstead"
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
emergency_git_server-0.0.6-py3-none-any.whl (22.3 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jan 22, 2018
emergency_git_server-0.0.6.tar.gz (20.9 kB) Copy SHA256 Checksum SHA256 Source Jan 22, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting