0

I have private repositories on bitbucket with my modules which are used in Magento2. All were installed using composer.

In ~/.ssh/config i have:

Host bitbucket.org
IdentityFile ~/.ssh/bitbucket_id_rsa
IdentitiesOnly yes

and in bitbucket_id_rsa is stored key.

My composer.json file under Magento installation looks like this:

"require": {
        "magento/product-community-edition": "2.3.4.0",
        "composer/composer": "@alpha",
        "MYREPO/MYPROJECT": "@dev",
        ...
}         
...

"minimum-stability": "dev",
...

"repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        {
                "type": "vcs",
                "url": "[email protected]:MYREPO/MYPROJECT.git"
        },
        ...
]

Everything is working ok with this configuration, i update module in bitbucket and with composer update i will then update it in Magento.

But now if i want to use also some modules from Magento Marketplace. So in Extension Manager i enter my private and public key from my Magento Marketplace account and i get error in Magento:

Command "show" failed: In Git.php line 381: Failed to execute git clone --mirror '[email protected]:MYREPO/MYPROJECT.git' '/var/www/vhosts/MYSITE/htdocs/var/composer_ho me/cache/vcs/git-bitbucket.org-MYREPO_MYPROJECT.git/' Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [--ignore IGNORE] [-m|--minor-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--] [ []]

So it looks like it's trying to use those entered private and public keys from Magento Marketplace and access my bitbucket private repositories with them? Or is there some other issue? Did anybody have a similar problem? Thanks

1 Answer 1

0

It looks like you are comfortable using Composer via the command line. The Extension Manager is really only a UI in front of Composer. The Marketplace repository is https://repo.magento.com/ combined with your Authentication Keys.

In short you can just use

composer require vendor/extension_name

for example

composer require fooman/emailattachments-m2

and you can view the name in your account under My Purchases > Technical Details:

View Technical Details

1
  • hi kristof, yes i am using composer from command line. but client want to use Extension Manager from backend, so need to know how to solve this issue, thanks
    – macho
    Commented Feb 27, 2020 at 7:11

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.