PHPackages                             delight-im/git-scraper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. delight-im/git-scraper

ActiveLibrary[Security](/categories/security)

delight-im/git-scraper
======================

Downloads entire Git repositories from publicly accessible ".git" folders over HTTP

v1.0.0(10y ago)18342Apache-2.0PHPPHP &gt;=5.5.0

Since Oct 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/delight-im/PHP-GitScraper)[ Packagist](https://packagist.org/packages/delight-im/git-scraper)[ Docs](https://github.com/delight-im/PHP-GitScraper)[ RSS](/packages/delight-im-git-scraper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

GitScraper
==========

[](#gitscraper)

Downloads entire Git repositories from publicly accessible `.git` folders over HTTP

- Directory indexes or directory browsing on the web server are *not* required
- Running `git update-server-info` on the server is *not* required

Requirements
------------

[](#requirements)

- PHP 5.5.0+

Installation
------------

[](#installation)

1. Include the library via Composer [\[?\]](https://github.com/delight-im/Knowledge/blob/master/Composer%20(PHP).md):

    ```
    $ composer require delight-im/git-scraper

    ```
2. Include the Composer autoloader:

    ```
    require __DIR__ . '/vendor/autoload.php';
    ```

Usage
-----

[](#usage)

```
$scraper = new \Delight\GitScraper\GitScraper('http://www.example.com/.git/');
$scraper->fetch();
// var_dump($scraper->getFiles());
$scraper->download('./');

```

Terminology
-----------

[](#terminology)

- hash
    - used to identify objects in Git
    - always uses the SHA-1 algorithm
    - has a length of 20 bytes, 40 hex characters or 160 bits
    - ensures file integrity
- object
    - stored in `.git/objects`
    - addressable by its unique hash
    - has a small header describing the type and length of its content
    - compressed with `zlib`
    - can be previewed (in a slightly modified version) by running the command `git cat-file -p {hash}`
- `commit` object
    - points to a single `tree` object (stored as 40 hex characters)
    - contains the name and email address of the committer as well as the commit time
    - includes information about the author (may *not* be the committer) which are analogous to the committer data
    - holds the commit message or description of the commit
    - points to the parent tree as well so that you can browse the history
- `tree` object
    - corresponds to a directory on the file system
    - contains pointers to other objects (stored as 20 bytes)
    - `tree` objects (i.e. sub-directories) and `blob` objects (i.e. files inside the directory) may be listed here
- `blob` object
    - similar to a file on the file system
    - simply a binary representation of the file

Further reading
---------------

[](#further-reading)

- [Pro Git](https://git-scm.com/book/en/v2)
    - ["Git Internals"](https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain)
    - ["The Dumb Protocol"](https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols#The-Dumb-Protocol)
- [Git Magic](http://www-cs-students.stanford.edu/~blynn/gitmagic/)
    - ["Secrets Revealed"](http://www-cs-students.stanford.edu/~blynn/gitmagic/ch08.html)
- [A Hacker's Guide to Git](http://wildlyinaccurate.com/a-hackers-guide-to-git/)

Contributing
------------

[](#contributing)

All contributions are welcome! If you wish to contribute, please create an issue first so that your feature, problem or question can be discussed.

Disclaimer
----------

[](#disclaimer)

You should probably use this library with your own websites and repositories only.

License
-------

[](#license)

```
Copyright (c) delight.im

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3859d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cabc03c705598aed200d843d4e5b1c6350729b060cc61ec8a1bb14e02e5c0a32?d=identicon)[delight-im](/maintainers/delight-im)

---

Top Contributors

[![ocram](https://avatars.githubusercontent.com/u/1681478?v=4)](https://github.com/ocram "ocram (11 commits)")

---

Tags

securitygitscrapervcsscm

### Embed Badge

![Health badge](/badges/delight-im-git-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/delight-im-git-scraper/health.svg)](https://phpackages.com/packages/delight-im-git-scraper)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41478.1M118](/packages/robrichards-xmlseclibs)[voku/anti-xss

anti xss-library

72317.1M77](/packages/voku-anti-xss)[spatie/laravel-csp

Add CSP headers to the responses of a Laravel app

8569.6M19](/packages/spatie-laravel-csp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
