crodas / php-git Goto Github PK
View Code? Open in Web Editor NEWPure PHP script which allows to performs read-only operations plus repositories clone (over HTTP).
Home Page: http://phpclasses.org/phpgit
Pure PHP script which allows to performs read-only operations plus repositories clone (over HTTP).
Home Page: http://phpclasses.org/phpgit
The git_http_client.php example uses a http RepoURL (http://github.com/crodas/php-git.git) that returns a 301 response to redirect to the https URL which is not handled by wgetFile (GitHub redirects http requests to https).
Error:
Alright!, you found a bug, please report it Page not found http://github.com/crodas/php-git.git/HEAD
HTTP Request and Response:
GET /crodas/php-git.git/HEAD HTTP/1.1
Host: github.com
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.67
Date: Mon, 09 May 2011 21:19:07 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: https://github.com/crodas/php-git.git/HEAD
See title. "http.php" is only accessible if you register yourself to a web site :/
See title. If the value is too small the user receives the following error message:
Warning: gzuncompress(): data error in GitBase.class.php on line 552
I'll try to look into this when I get some time.
$ php -f git_http_client.php
Getting HEAD
Getting info/refs
Getting refs/heads/master
Getting packed-refs
Getting branch [c767a53] refs/heads/master
Getting objects/c7/67a534b280ade1e300a9aa9ae08218dd577966
Getting objects/info/packs
PHP Notice: Undefined index: P in /path/to/php-git/phpgit/gitclone.php on line 204
PHP Stack trace:
PHP 1. {main}() /path/to/php-git/examples/git_http_client.php:0
PHP 2. GitClone->doClone() /path/to/php-git/examples/git_http_client.php:26
PHP 3. GitClone->fetchCommit() /path/to/php-git/phpgit/gitclone.php:150
PHP 4. GitClone->fetchObject() /path/to/php-git/phpgit/gitclone.php:226
Getting objects/pack/
PHP Warning: file_put_contents(php-git/.git/config): failed to open stream: No such file or directory in /path/to/php-git/phpgit/gitclone.php on line 176
PHP Stack trace:
PHP 1. {main}() /path/to/php-git/examples/git_http_client.php:0
PHP 2. GitClone->doClone() /path/to/php-git/examples/git_http_client.php:26
PHP 3. file_put_contents() /path/to/php-git/phpgit/gitclone.php:176
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.