There are times when you might want to use your personal private library in another project. For example, you may have many private projects that share a common library that can’t be open source. In this situation, you could use Packagist and pay to have a private repository, or you could use Bitbucket with its FREE private repositories.
To include your private Bitbucket repository via Composer, add the following lines into your composer.json:
"repositories":[
{
"type": "vcs",
"url" : "git@bitbucket.org:yourName/yourRepository.git"
}
]
VCS stands for “version control system.” This includes versioning systems like git, svn, fossil, or hg. The composer has a repository type for installing packages from these systems.
If you launch composer-install
now, you have to put a Consumer key into your
So, to avoid this problem you need to open your main repository, from Bitbucket. To do this, create an ssh key and copy the public key.
After that, you need to open your private library from Bitbucket, add an access ssh key, and paste the previously created public key.
You can now launch composer-install for any request that comes up into your CLI and have a perfect automatic deployment.
Free Resources