0

I'd like to know how to install extensions on my Magento 2.1 using Github / Bitbucket / Gitlab with public and private repositories.

Thanks.

asked May 23, 2017 at 2:40

1 Answer 1

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.

Reference here.


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
answered May 23, 2017 at 2:40

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.