Most of PHP framework now a day uses composer.json to install packages. In this article I am going to show you an overview on adding PHP packages from your private repository to a composer.json file.
1. Configure Composer
Add this line into your composer.json to point to your private repository.
"url": "[email protected]:Hidden_blindspot/codebook.git"
2. Create an SSH key
Create an SSH Key on the machine on which you want to install the package.
For your reference you can visit the link below:
3. Run composer
Lastly, you can run composer require or composer install to install the package.
That’s it! You can now start adding your packages from your private repositories. Happy Coding!!