我想知道你如何在智能http的git repos之间进行身份验证。
例如,我在/repos/
中拥有所有存储库,但是,我想将“John Doe”分配给其中两个。另一个我想要“Jane Doe”访问;但是,我不希望其中任何一个能够访问彼此的存储库。
顺便说一下: 我确实使用http auth在genernal中进行用户身份验证,这是分离私有。对于某些用户来说,就是我真正追求的目标。
答案 0 :(得分:0)
答案 1 :(得分:0)
我与https://github.com/sitaramc/gitolite的开发人员交谈,他指出了我的方向:
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.