Magento 2 EE – Fix Key Issue When Installing with Composer

composermagento-enterprisemagento2

Attempting to install Magento 2 EE for a client according to this documentation: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install_ee.html

I ran the command:

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition enterprise-instance

As stated in the documentation, I was prompted for my private/public key pair which I retrieved from my magento.com account. As I'm just the developer and this is not the client's key pair, I received the expected error:

"[InvalidArgumentException]                                                        
  Could not find package magento/project-enterprise-edition with stability stable."

The documentation states: "If you receive this error after creating authentication keys as discussed previously, your account might not be authorized to download Magento EE. Contact Magento support to resolve the issue."

Not a problem, I realized that I should have provided the client's key pair which they then provided.

The issue I'm running into now is that composer is not prompting me to put in a new key pair, I just keep getting the same error message about not being able to find the stable package.

Question: How do I get composer to prompt me for a new key pair? Is there an argument that needs to be passed in the composer statement?

Best Answer

If you use linux, you can change the default credential here /home/user/.composer/auth.json

Related Topic