An open API service indexing awesome lists of open source software.

https://github.com/j-m-li/git-http-backend-php

Run git server on website that can only run PHP scripts
https://github.com/j-m-li/git-http-backend-php

git-backend-http git-http-backend php

Last synced: about 2 months ago
JSON representation

Run git server on website that can only run PHP scripts

Awesome Lists containing this project

README

          

# git-http-backend-php

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

Note that PHP ``proc_open`` must be enabled.

![](git.gif)

```

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.