composer-php How to use private repositories with Composer

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Parameters

ParametersDetails
repositoriesTells Composer where it can download the required packages.
type: vcsTells Composer how to treat the repository.
url: http://...Tells Composer where is the repository.

Remarks

Use the type: "vcs" syntax to use private repositories.

To manage access to the private repository while developing on a local machine, use an auth.json file and don't commit it in you project repository. Instead, give access to each single developer to the private repository so, using each one his/her own NOT COMMITTED auth.json file, they can fetch the remote repository with composer install or composer update.

Tip: Put the auth.json file in the .gitignore file of your git repository.

If you are using a continuous integration system, use the COMPOSER_AUTH environment variable.



Got any composer-php Question?