cancel
Showing results for 
Search instead for 
Did you mean: 

Stuck in composer

Stuck in composer

I keep getting this error when adding my access keys. It will not let me add the password (private key)

Authentication required (repo.magento.com):
Username: a**************************a
Password: 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

18 REPLIES 18

Re: Stuck in composer

Hello @eric_leisenring 

 

1. Login/Signup your account here :

https://account.magento.com/customer/account/login

2. Navigate in account to marketplace > My Products > Access keys.

3. Create a new access key.

 

It will resolve your problem Smiley Happy

 

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Stuck in composer

Yeah I tried that three times with no luck

Re: Stuck in composer

@eric_leisenring 

 

Make sure you have downloaded the community edition Magento, not enterprise, because Enterprise is paid and those keys will be needed.

 

You can install community edition Magento by command :

 

 composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>

 

 

and for Enterprise :

 composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <install-directory-name>

Hope it helps !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Stuck in composer

Sadly, I am using the community version. 

Re: Stuck in composer

Then those keys should work, create new keys and from Magento account and paste those again.

This is the only keys which community requires !

Problem Solved ? Click on 'Kudos' & Accept as Solution ! Smiley Happy

Re: Stuck in composer

I have tried this and I get the exact same problem. As soon as I paste my username in I get the error message

Re: Stuck in composer

I am getting the same problem here...Community version, new keys, tried everything!

It is the composer. Composer 2.0 doesnt work properly wit...

It is the composer. Composer 2.0 doesnt work properly with magento 2 repos.

Re: It is the composer. Composer 2.0 doesnt work properly wit...

If someone still has trouble with getting magento 2 through composer because of authentication keys issue as given below, then make sure to update your auth.json with your Magento Authentication Keys (generated from marketplace.magento.com) inside your COMPOSER_HOME directory and then exit from your terminal / bash / shell and reopen it and try composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2/ command again to get Magento.

 

 

Spoiler
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

 

 

Detailed step by step instructions are given below:

 

1. Generate Authentication Keys inside your Magento Makeplace Account

 

https://marketplace.magento.com/customer/accessKeys/

 

2. Find your local machine composer home directory by typing the command below

 

 

$ composer config --list --global | grep 'home'

it shows your composer path. In Windows 10 its like 

 

C:/Users/youruser/AppData/Roaming/Composer

 

3. Open the auth.json inside the Composer Home directory (in a text-editor) 

 

4. Update the file with your keys like given below

 

 

{
    "bitbucket-oauth": {},
    "github-oauth": {},
    "gitlab-oauth": {},
    "gitlab-token": {},
    "http-basic": {
		"repo.magento.com": {
            "username": "<your_public_key>",
            "password": "<your_private_key>"
        }
	},
    "bearer": {}
}

5. Exit the bash / shell / terminal and reopen it again and try the composer command to get the Magento package now. It will work.

 

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <your_magento2_install_dir>/

 

BTW my Composer version is 2.x. and am on Windows 10

 

$ composer --version
Composer version 2.0.8 2020-12-03 17:20:38

 

Hope this Helps !

 

Jerome

Magento 1.x and 2.x Developer