Skip to content
Advertisement

How to add private github repository as Composer dependency

I have the following in my Laravel 5.1 projects composer.json to add a public github repository as a dependency.

JavaScript

This works as long as the repository is public. Now I’ve set this repository to private. The git credentials I use for pulling/pushing to ‘my_private_repo’ are the one of a colaborator of the project. How can I achieve that composer pulls from that private repository when I run composer update or composer install?

Advertisement

Answer

Work with private repositories at GitHub and BitBucket:

JSON

JavaScript

The only requirement is the installation of SSH keys for a git client.

Docs

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement