I'd like to know how to install extensions on my Magento 2.1 using Github / Bitbucket / Gitlab with public and private repositories.
Thanks.
1 Answer 1
Public Github repository
Your custom branch name must be prefixed with "dev-".
{
 "repositories": [
 {
 "type": "vcs",
 "url": "https://github.com/igorw/monolog"
 }
 ],
 "require": {
 "monolog/monolog": "dev-bugfix"
 }
}
Private Github repository
Exactly the same solution allows you to work with your private repositories at GitHub and BitBucket:
{
 "require": {
 "vendor/my-private-repo": "dev-master"
 },
 "repositories": [
 {
 "type": "vcs",
 "url": "[email protected]:vendor/my-private-repo.git"
 }
 ]
}
The only requirement is the installation of SSH keys for a git client.
Using the CLI to install
composer config repositories.foo vcs https://github.com/foo/bar
After these commands run the command below in the root of your Magento 2 installation.
alias mage="php -d memory_limit=-1 -f bin/magento" &&
mage setup:upgrade && 
mage setup:upgrade && mage cache:flush
Explore related questions
See similar questions with these tags.