{"id":15470443,"url":"https://github.com/mborne/remote-git","last_synced_at":"2026-04-02T14:24:13.224Z","repository":{"id":60130418,"uuid":"159057854","full_name":"mborne/remote-git","owner":"mborne","description":"A lightweight PHP client providing a consistent access to hosted and self-hosted git repositories (github, gitlab, gogs and gitea)","archived":false,"fork":false,"pushed_at":"2026-03-27T00:03:34.000Z","size":159,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-27T11:08:54.530Z","etag":null,"topics":["client","client-library","git","gitea","github","gitlab","gogs","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mborne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-11-25T17:40:36.000Z","updated_at":"2026-03-27T00:02:47.000Z","dependencies_parsed_at":"2024-10-02T02:04:47.226Z","dependency_job_id":null,"html_url":"https://github.com/mborne/remote-git","commit_stats":{"total_commits":58,"total_committers":3,"mean_commits":"19.333333333333332","dds":"0.051724137931034475","last_synced_commit":"6b7f80fe8185ee92559daf60b01271a7e146e011"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/mborne/remote-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mborne%2Fremote-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mborne%2Fremote-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mborne%2Fremote-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mborne%2Fremote-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mborne","download_url":"https://codeload.github.com/mborne/remote-git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mborne%2Fremote-git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","client-library","git","gitea","github","gitlab","gogs","php"],"created_at":"2024-10-02T02:04:42.246Z","updated_at":"2026-04-02T14:24:13.219Z","avatar_url":"https://github.com/mborne.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mborne/remote-git\n\n[![CI](https://github.com/mborne/remote-git/actions/workflows/ci.yml/badge.svg)](https://github.com/mborne/remote-git/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/mborne/remote-git/badge.svg?branch=master)](https://coveralls.io/github/mborne/remote-git?branch=master)\n\n## Description\n\nA lightweight PHP client providing a consistent access to hosted and self-hosted git repositories (github, gitlab, gogs and gitea).\n\n## Use cases\n\n- The original development has been realized in [mborne/satis-gitlab](https://github.com/mborne/satis-gitlab) repository to **generate a config file referencing git repositories**.\n- This module is also used by [mborne/git-manager](https://github.com/mborne/git-manager#git-manager) to **backup and analyse git repositories** (for example that following files are present : README.md, LICENSE,...)\n\n## Features\n\n* List repositories from multiple GIT hosting services filtering by\n    * usernames\n    * organizations/groups\n* Get raw files from repositories\n* Apply custom filter\n    * Project contains a given file (`RequiredFileFilter`)\n    * Project is a composer project (`ComposerProjectFilter`)\n    * Project name doesn't match a given regexp (`IgnoreRegexpFilter`)\n\n## Requirements\n\n* [PHP \u003e= 8.3](https://www.php.net/supported-versions.php)\n* Supported GIT hosting services :\n\n| Type      | Description                                                              |\n| --------- | ------------------------------------------------------------------------ |\n| gitlab-v4 | [gitlab.com](https://about.gitlab.com/) and self hosted gitlab instances |\n| github    | [github.com](https://github.com)                                         |\n| gogs-v1   | [Gogs](https://gogs.io/) or [Gitea](https://gitea.io/)                   |\n\n## Usage\n\n### Create a client\n\n```php\n// configure client\n$clientOptions = new ClientOptions();\n$clientOptions\n    -\u003esetUrl('https://github.com')\n    -\u003esetToken($token)\n;\n\n// create client\n$client = ClientFactory::createClient(\n    $clientOptions,\n    new NullLogger()\n);\n```\n\n### Filter by usernames or orgs/groups\n\n```php\n$options = new FindOptions();\n// Use '_me_' on github to include private repositories\n$options-\u003esetUsers(array('mborne'));\n$options-\u003esetOrganizations(array('symfony','FriendsOfSymfony'));\n$projects = $client-\u003efind($options);\n```\n\n### Filter according to composer.json\n\n```php\n$options = new FindOptions();\n$options-\u003esetUsers(array('mborne'));\n$filter = new ComposerProjectFilter($client);\n$filter-\u003esetType('library');\n$options-\u003esetFilter($filter);\n$projects = $client-\u003efind($options);\n```\n\n### Compose filters\n\n```php\n$options = new FindOptions();\n$options-\u003esetUsers(array('mborne'));\n\n$filterCollection = new FilterCollection();\n\n// filter according to composer.json\n$composerFilter = new ComposerProjectFilter($client);\n$composerFilter-\u003esetType('library');\n$filterCollection-\u003eaddFilter($composerFilter);\n\n// filter according to README.md\n$filterCollection-\u003eaddFilter(new RequiredFileFilter(\n    $client,\n    'README.md'\n));\n\n$options-\u003esetFilter($filterCollection);\n$projects = $client-\u003efind($options);\n```\n\n## Dependencies\n\n* [guzzlehttp/guzzle - 7.x](https://packagist.org/packages/guzzlehttp/guzzle)\n* [psr/log](https://packagist.org/packages/psr/log)\n\n\n## License\n\n[MIT](LICENSE)\n\n## Testing\n\n* Configure access token for github.com and gitlab.com APIs (optional) :\n\n```bash\n# see https://github.com/settings/tokens\nexport GITHUB_TOKEN=AnyGithubToken\n# see https://gitlab.com/-/profile/personal_access_tokens\nexport GITLAB_TOKEN=AnyGitlabToken\n# see https://gitea.com/user/settings/applications\nexport GITEA_TOKEN=AnyGiteaToken\n```\n\n* Install dependencies and run tests :\n\n```bash\nmake test\n# Alternative :\n# composer install\n# vendor/bin/phpunit -c phpunit.xml.dist\n```\n\nNote that an HTML coverage report is generated to `output/coverage/index.html`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmborne%2Fremote-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmborne%2Fremote-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmborne%2Fremote-git/lists"}