2

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?

2 Answers 2

1

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.