Setup Composer auth creds

Downloading software from Magento's servers requires a Composer auth key and secret to be setup. This helps Magento track who is using their software packages.

Go to Magento.com, register if you haven't already, and login. Once on the my account section, click Marketplace. Next click on your name at the top right of the screen, then click My Profile.

You'll be on the Marketplace tab. Click Access Keys. Click Create A New Access Key. In the input field that opens, type a name - it could be whatever you wish. After clicking OK, you'll see the public and private keys on the screen.

You should have Composer installed on your local machine. You can verify it is installed along with the version by typing

composer --version

If it's not installed, go ahead and install it. From here, we'll type the line

composer global config http-basic.repo.magento.com

Next, we can copy and paste both the Public and Private Key from the Access Key we just generated.

Let's confirm this is all setup by opening the Composer auth json file. This is in an auth.json file located within hidden home directory named .composer. We'll see the info that was just added, and we can even edit the file manually in the future if we wish.

Discussion

0 comments