4

I want to setup new extension with composer on magento2 and I get this error:

[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

I use public key and private key as user and password ( get key from marketplace.magento.com )

I use this comment for install new extension:

composer require mageplaza/composer require mageplaza/magento-2-seo-extension
1

I want you to try two things:

  1. Do you have more than one pair of public and private key enabled? If yes then try by enabling just one and disable all else.
  2. Create auth.json:

    To create auth.json:

    • Log in to your Magento server as, or switch to, the Magento file system owner.
    • Edit or create auth.json in the user’s home directory.

      The following example shows how to add repo.magento.com authentication to an existing file:

{
   "github-oauth": {
     "github.com": "<your github oauth id>"
   },
   "http-basic": {
      "repo.magento.com": {
         "username": "<public key>",
         "password": "<private key>"
      }
   }
}

Source: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/dev_install.html#create-authjson

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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