Private Packagist Synchronization
How synchronization with GitHub, GitLab and Bitbucket automates the management of a Private Packagist organization and its Composer repository
How synchronization automates the management of a Private Packagist organization and its Composer repository
What makes Private Packagist really quick to setup and hassle-free to maintain is synchronization. If you’re using GitHub, Bitbucket or GitLab you can automatically get all the packages, teams, users and permissions from your GitHub organization, Bitbucket team, or GitLab group to show up in your Private Packagist organization. (Don’t ask me why they each use a different word to describe the same thing, for simplicity I’ll stick to organization when I mean any of the three).
How does Synchronization work?
A Private Packagist organization provides a JSON Composer repository listing all your private and mirrored open-source packages for Composer to use when resolving and installing dependencies. Which packages show up on it exactly can be configured using permissions. To make this as easy to manage as possible we launched Private Packagist with GitHub synchronization and soon after launched support for Bitbucket and GitLab.
Synchronization will automatically find all repositories on your external (GitHub, Bitbucket, GitLab) organization and initialize them as packages in your Private Packagist organization. It’ll set up your teams and members to match the same permission structure configured in the external organization. So you really just need to hit a button and get a fully working Private Packagist Composer repository.
Synchronizing Private Packagist Composer repositories with multiple external organizations
Today we’re launching a new feature for synchronization on Private Packagist: Synchronizing multiple external organizations into a single Private Packagist organization and its Composer repository.
Synchronizing multiple sources will be useful for anyone using multiple external services for their code, e.g. if you have some of your projects on GitHub and some on Bitbucket. But it will also help those of you who use multiple organizations on the external system, e.g. 2 GitHub organizations. To our surprise this is much more common than we had originally expected. Companies set up separate organizations on GitHub for different aspects of their business but end up deploying applications using pieces from all of them.
Especially on the on-premises/Enterpise products of GitHub, Bitbucket and GitLab users often set up many separate organizations for different departments or projects but require code from all of them in their PHP projects. So as of today, you can synchronize as many different organizations into a single Private Packagist organization and use code from all of them in a single Composer repository!