Solution to: Authentication required (repo.magento.com)

To install magento using composer, you will first need to generate a public and private key pair from the magento marketplace.

4202 views
d

By. Jacob

Edited: 2020-09-16 12:00

Warning from repo.magento.com: You haven't provided your Magento authentication keys. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html
Authentication required (repo.magento.com):

When we attempt to install magento for the first time, we will be prompted to enter a username and password; if we dig around a bit more, we will learn that this is actually not what people would intuitively expect a username and password to be — instead, this actually refers to a public and private key pair that you must first generate.

Before you can install magento using composer, you first need to generate this key pair; to do that, complete the following steps:

  1. Create an account at magento.com, and agree for them to send you marketing e-mails (spam?).
  2. Validate your e-mail address. Note that you might not get the first validation e-mail, so you may need to request a second one!
  3. Login on https://marketplace.magento.com/
  4. Create a new access key. This generates a public and a private key; the public key is your username, and the private key is your password.

After doing this, simply enter the command from terminal to install magento:

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition /path/to/install/directory

Read this official guide to learn how to obtain your keys: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/connect-auth.html

Tell us what you think: