使用 WebDAV 存取 Git

會想要用 WebDAV 存取 Git 是因為目前在用的 SubversionMercurial 都可以掛在 Apache 下,透過 LDAP 認證。

Google 找資料通常會找到 kernel.org 的「Setting up a git repository which can be pushed into and pulled from over HTTP(S).」這篇,實際上也只需要看這篇,因為這篇沒提到的東西都做不到... (炸)

照著 kernel.org 那篇的作法應該都沒問題,最大的麻煩在於必須把密碼寫到 ~/.netrc 裡,不寫的話不會像 Mercurial 會給提示要求輸入密碼,反而當作是沒有密碼送出去,於是 server 端就會看到不允許空密碼的錯誤訊息。

我實在不喜歡把密碼寫到檔案裡,看來還是得試看看以 ssh 認證...

One thought on “使用 WebDAV 存取 Git”

Leave a Reply

Your email address will not be published. Required fields are marked *