Skip to content

abtOliver/GitSmartPHP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 

Repository files navigation

Git Smart HTTP with PHP

Introduction

(Sorry for my english)

After evaluated several possible cloud storage based solutions like Amazon S3, Google Drive & Dropbox as my private git repo. I find these solutions don`t really suit my needs. As each of them requires you to either install a client, mount the storage, manual/auto sync the contents etc.

Then I explored Git smart http as potential candidate as it provides much simplier solution to my need. All I have to do is to install a Git client then I`m set to push my repo into my centralized Git (with smart http) repository on my own hosting server. However, setting it up was a bit cumbersome (httpd.conf etc) and can be improved better.

Therefore I come out this single PHP file that act as middle man to handle request between your git client and git smart http backend.

Now with only Git installed on the computer, you are ready to work with your project. :)

Requirement

  • Web server with Git (> v1.6.6) and PHP (> v5) installed

Setup

  1. Make sure your web server has Git installed and your web server supports PHP

  2. Upload GitSmart.php onto your hosting directory (Eg. /home/my/public_html/GitSmart.php)

  3. Create a folder (Eg. /home/my/public_html/repo) for all your git repositories storage.

  4. chown apache:apache git.php and chown apache:apache repo

  5. Proceed to http://<yoursite>/GitSmart.php?admin to init a repo and to manage them (http://<yoursite>/GitSmart.php is doing the same)

  6. With git remote add origin http://<yoursite>/GitSmart.php/<reponame>, you can push your local git repo to your private repo online.

  7. With an AliasMatch "(?x)^(.*)$" /home/my/public_html/GitSmart.php$1 in your Apaches virtual host section it is possible to open the admin form with http://<yoursite>/ and you can use git remote add origin http://<yoursite>/<reponame> to access your repos

Todo

  • Explain debug log feature

  • Explain http auth feature

  • Explain gzip support feature

About

Git smart HTTP with PHP in single file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%