Git-Http をやってみた

ようするに,以下が必要らしい.

  • WebDAV
  • Git --bare 的なもの
  • git server-update

Apache 側は

  • ロケーションに対して DAV on する
  • passwd (Auth)
$ cd /etc/apache2
$ vi httpd.conf
$ git diff httpd.conf
-#Include /private/etc/apache2/extra/httpd-dav.conf
+Include /private/etc/apache2/extra/httpd-dav.conf

*1

repository 側は,

  • hooks/post-update - update-server-info
$ mkdir ~/Sites/my-new-repo.git
$ cd !$
$ git init --bare
$ cp hooks/post-update.sample hooks/post-update
# 最初から update-server-info の設定になってる!
$ vi .htaccess
$ cat !$
AuthType Basic
AuthName "Git"
AuthUserFile /Users/clairvy/Sites/my-new-repo.git/passwd
Require valid-user

最初 info/refs が無くてなんでやねん.
と思っていたら.単に typo していただけだったという.

参考

*1:なんかコマンドで a2e 的な有効にしたりするのかなぁ?