2011-01-16 20 views
1

git reposとsmart httpの認証方法が不思議でした。Git Smart HTTP - 特定のリポジトリのユーザ認証

例えば、すべてのリポジトリは/repos/にありますが、2つだけに "John Doe"を割り当てたいと思います。もう1つは「Jane Doe」にアクセスすることです。しかし、私はどちらか一方がお互いのリポジトリにアクセスできるようにしたくありません。

ところで 私はhttp認証で一般的に働いているユーザー認証を持っています、それは分離privです。特定のユーザーのために私は本当に後です。

+0

あなたは、httpが必要です、または(制限付き)でしょうか? – huitseeker

+0

私はhttpが好きで、以前はsshルートに行きました。 – drewrockshard

+0

明らかにgitoliteがスマートなHTTPをサポートするようになりました:http://github.com/sitaramc/gitolite/blob/pu/doc/http-backend.mkd - きめ細かなアクセスコントロールがスマートなHTTPにも拡張されているかどうかはわかりません、 しかしながら。 –

答えて

0

私はhttps://github.com/sitaramc/gitoliteの開発者に話を聞いた、彼は方向に私を指摘:SSHアクセスが十分で

 
in short, you need a "mini gitolite"? 

(1) set it up the way my man page says but instead of using 
gl-auth-command use your script 

(2) your script should do/deal with the following: 

- it should take the authenticated username from $REMOTE_USER 
- it should look at the PATH_INFO, REQUEST_URI, etc., to find out 
what repo he wants to access and whether he wants to read or write 
(you can see the code in simulate_ssh_connection() in my code for 
that) 
- then use whatever logic you want to decide if you should allow or 
reject the request 

If you allow it you must "exec" the original git-http-backend. 
0

httpをトランスポートとして使用すると、WebDAVを使用できます。公式のハウツーはhereですが、チュートリアルにはウェブがたくさんあります。

+0

私はWebDAVを使用する必要がないようにスマートなhttpを使用しています。 – drewrockshard

関連する問題