Skip to content
Jonas Haag edited this page Jul 1, 2014 · 7 revisions

What is Smart HTTP mode?

When Smart HTTP mode is enabled, you can pull from and push to a repository using its usual HTTP URL. For example, if you host your klaus installation at http://yourdomain.org/git/ and have a repository named demo, you can use http://yourdomain.org/git/demo for push and pull:

git clone http://yourdomain.org/git/demo
git push http://yourdomain.org/git/demo master

How to enable Smart HTTP mode

Note: Repositories are always world-readable, i.e. may be cloned/pulled from without any sort of authentication. Authentication for read access may be implemented on a different level (nginx/Apache/...). (This may change in a future version. See #88).

  1. Using the integrated web server: klaus ... --smarthttp ...
  2. Using a "real" web server": Either set the KLAUS_USE_SMARTHTTP environment variable or roll your own version of the klaus/contrib/wsgi.py script.

How to enable push

For security reasons, git push-ing to your Smart HTTP klaus installation works only with authentication. This requires that you specify credentials in a htdigest file. This may be done using the htdigest command line tool:

htdigest -c klaus-push-credentials.htdigest youdomain.org yourusername

To enable push support:

  1. Using the integrated web server: klaus ... --smarthttp --htdigest /path/to/your/klaus-push-credentials.htdigest ...
  2. Using a "real" web server": Either set the KLAUS_HTDIGEST_FILE environment variable to the path where your credentials file is located, or roll your own version of the klaus/contrib/wsgi.py script.
Clone this wiki locally