Вопрос

I am busy installing gitolite3 with smart http. Gitolite3, essentially, is just a bunch of scripts that relay requests back to the git-http-backend (i think), and calls all sorts of hooks before/during/after every public git request.

Is there somewhere a similar thing written in php? When I view the urls that git requests over http in firefox, I notice that the communication is nothing else but text, so I'm pretty sure you could 'catch' git requests per php in apache (or nginx), and run a authorization system like that, that relays these git requests to the git backend.

I guess I'm looking for a php-git module, but I couldn't find anything. Is there something out there like Im describing here?

Это было полезно?

Решение

gitoltie is a perl script which takes an login name and check if, based on who you are, the git command should be executed or denied: it is an authorization layer.

As long as your framework (in your case PHP) can call that perl script, you can plug gitolite in any system.
That is what I do with:

As long as your web server can call a perl script before accessing php pages, you can use gitolite.

Trying to re-implement gitolite in php (as in this github project) would not be as good a solution.

Другие советы

I've done a similar project here at github to help me setup git smart http easily without touching httpd.conf or toying with .htaccess.

It would really act like a relay request between your git client and git-http-backend thru a single php file like what you said.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top