Skip to content

Latest commit

 

History

History
43 lines (21 loc) · 1006 Bytes

README.md

File metadata and controls

43 lines (21 loc) · 1006 Bytes

git-http-backend-php

Run git https backend on servers that don't support cgi-bin.

Note that PHP proc_open must be enabled.


sudo apt install apache2 php git

cp -r ./html/* /var/www/html/
 
cp -r repos /usr/share/
chmod -R a+w /usr/share/repos/r.php/

echo GIT doesn't support large updates over https by default
git config --global http.postBuffer 5000000000

mkdir test
cd test
git clone http://testuser:1234@localhost/repos/r.php/hello

Note that the directory "/usr/share/" must be configured at the end of the file html/repos/r.php .

"/var/www/html/" is the root of you Apache web site.

"/usr/share/" is the root your writable directory.

"repos" directories must be at the root of your web site and your writable directory.

In the default configuration git-http-backend translates the URL "http://localhost/repos/r.php/hello" to the path "/usr/share/repos/r.php/hello/".

You should never allow HTTP access on real servers, you must only use HTTPS.