-
Notifications
You must be signed in to change notification settings - Fork 104
Smart HTTP
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
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).
- Using the integrated web server:
klaus ... --smarthttp ...
- Using a "real" web server": Either set the
KLAUS_USE_SMARTHTTP
environment variable or roll your own version of theklaus/contrib/wsgi.py
script.
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:
- Using the integrated web server:
klaus ... --smarthttp --htdigest /path/to/your/klaus-push-credentials.htdigest ...
- 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 theklaus/contrib/wsgi.py
script.