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
- Host: GitHub
- URL: https://github.com/j-m-li/git-http-backend-php
- Owner: j-m-li
- License: bsd-3-clause
- Created: 2023-03-12T13:08:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-23T12:48:53.000Z (about 2 years ago)
- Last Synced: 2024-08-19T21:12:04.358Z (almost 2 years ago)
- Topics: git-backend-http, git-http-backend, php
- Language: Shell
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.

```
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.