{"id":19144359,"url":"https://github.com/piotrpress/private-composer","last_synced_at":"2026-04-30T12:32:51.621Z","repository":{"id":57933224,"uuid":"529249158","full_name":"PiotrPress/private-composer","owner":"PiotrPress","description":"This composer plugin adds github and bitbucket protocols support to Composer in order to simplify private repositories handling.","archived":false,"fork":false,"pushed_at":"2024-02-20T14:34:30.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T13:38:50.239Z","etag":null,"topics":["bitbucket","composer","composer-plugin","github","php","private","private-package","private-packagist","private-repositories","private-repository","stream","streams"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/PiotrPress.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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}},"created_at":"2022-08-26T12:29:32.000Z","updated_at":"2024-02-20T14:40:59.000Z","dependencies_parsed_at":"2024-02-20T15:50:53.868Z","dependency_job_id":null,"html_url":"https://github.com/PiotrPress/private-composer","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"c0551ff914a7bbd2cd510ae1fc495d897e842047"},"previous_names":["piotrpress/private-composer","piotrpress/composer-streams"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/PiotrPress/private-composer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiotrPress%2Fprivate-composer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiotrPress%2Fprivate-composer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiotrPress%2Fprivate-composer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiotrPress%2Fprivate-composer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiotrPress","download_url":"https://codeload.github.com/PiotrPress/private-composer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiotrPress%2Fprivate-composer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32465009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bitbucket","composer","composer-plugin","github","php","private","private-package","private-packagist","private-repositories","private-repository","stream","streams"],"created_at":"2024-11-09T07:34:38.381Z","updated_at":"2026-04-30T12:32:51.601Z","avatar_url":"https://github.com/PiotrPress.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Private Composer\n\nThis composer plugin adds `github` and `bitbucket` protocols support to Composer in order to simplify [private repositories](https://getcomposer.org/doc/05-repositories.md#using-private-repositories) handling.\n\nPrivate Composer uses **GitHub** and **BitBucket** APIs to build `packages.json` virtual file on the fly, with all packages from owner's repositories, which can be used in repository type `composer` in `composer.json` file.\n\n## Example\n\nInstead of manually adding each one repository separately to `composer.json` file, e.g.:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"vcs\",\n      \"url\":  \"https://github.com/PiotrPress/private-repo-1.git\"\n    },\n    {\n      \"type\": \"vcs\",\n      \"url\":  \"https://github.com/PiotrPress/private-repo-2.git\"\n    }\n  ],\n  \"require\": {\n    \"piotrpress/private-repo-1\": \"dev-master\",\n    \"piotrpress/private-repo-2\": \"*\"\n  }\n}\n```\n\nuse (in this example) `github` protocol:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"github://PiotrPress\"\n    }\n  ],\n  \"require\": {\n    \"piotrpress/private-repo-1\": \"dev-master\",\n    \"piotrpress/private-repo-2\": \"*\"\n  }\n}\n```\n\n## Installation\n\n1. Add the plugin as a global composer requirement:\n\n```shell\n$ composer global require piotrpress/private-composer\n```\n\n2. Allow the plugin execution:\n\n```shell\n$ composer config -g allow-plugins.piotrpress/private-composer true\n```\n\n## Authentication\n\nAdd GitHub/BitBucket API [authentication](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#http-basic) credentials:\n\n```shell\n$ composer config [--global] http-basic.\u003chost\u003e \u003cusername\u003e \u003cpassword\u003e\n```\n\n**NOTE:** using `--global` option is recommended to keep credentials outside of project's files.\n\n### GitHub\n\n1. `github.com` example:\n\n```shell\n$ composer config --global http-basic.github.com x-oauth-basic token\n```\n\n2. Custom domain example:\n\n```shell\n$ composer config --global http-basic.example.com x-oauth-basic token\n```\n\n- `host` - GitHub's domain, if empty it's equivalent: `github.com`\n- `username` - always `x-oauth-basic`\n- `password` - GitHub's `token` (generate new one using this [link](https://github.com/settings/tokens/new?scopes=repo\u0026description=Private-Composer))\n\n### BitBucket\n\n1. `bitbucket.org` example:\n\n```shell\n$ composer config --global http-basic.bitbucket.org username app_password\n```\n\n2. Custom domain example:\n\n```shell\n$ composer config --global http-basic.example.com username app_password\n```\n\n- `host` - BitBucket's domain, if empty it's equivalent: `bitbucket.org`\n- `username` - BitBucket's `username`\n- `password` - BitBucket's `app_password` (generate new one using this [link](https://bitbucket.org/account/settings/app-passwords/))\n\n## Usage in `composer.json` file\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"\u003cgithub|bitbucket\u003e://\u003cowner\u003e[@\u003chost\u003e]\"\n    }\n  ]\n}\n```\n\n### GitHub\n\n1. `github.com` example:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"github://PiotrPress\"\n    }\n  ]\n}\n```\n\n2. Custom domain example:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"github://PiotrPress@example.com\"\n    }\n  ]\n}\n```\n\n- `owner` - GitHub's repository `owner`\n- `host` - API endpoint domain, if empty it's equivalent: `github.com`\n\n### BitBucket\n\n1. `bitbucket.org` example:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"bitbucket://PiotrPress\"\n    }\n  ]\n}\n```\n\n2. Custom domain example:\n\n```json\n{\n  \"repositories\": [\n    {\n      \"type\": \"composer\",\n      \"url\":  \"bitbucket://PiotrPress@example.com\"\n    }\n  ]\n}\n```\n\n- `owner` - BitBucket's `workspace`\n- `host` - API endpoint domain, if empty it's equivalent: `bitbucket.org`\n\n## Usage as a `command`\n\n```shell\n$ composer packages \u003cgithub|bitbucket\u003e://\u003cowner\u003e[@\u003chost\u003e]\n```\n\nCommand's output is a valid `packages.json` file content.\n\n### Example\n\n```shell\n$ composer packages github://PiotrPress \u003e packages.json\n```\n\n## Note\n\nIf there are many repositories to scan, it may be necessary to increase the process [timeout](https://getcomposer.org/doc/articles/scripts.md#managing-the-process-timeout).\n\n## Requirements\n\n- PHP \u003e= `7.4` version.\n- Composer ^`2.0` version.\n\n## License\n\n[MIT](license.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpress%2Fprivate-composer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiotrpress%2Fprivate-composer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiotrpress%2Fprivate-composer/lists"}