Skip to content

j-m-li/git-http-backend-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Run git server on website that can only run PHP scripts

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors