All answers are good just to compile possible scenarios on a single place.
Magento announced a new way to communicate to marketplace via compsoer, when you run composer install
in the root directory of Magento it will prompt for username and password, remember this is not the Magento username and password it is Public and Private key of Magento Marketplace.
Login to Magento Marketplace.
Go to My Account.
Under My Products click Access Keys.
Select ver of Magento (1 or 2).
Click Create A New Access Key, in popup box name your key.
Clicking on Ok will generate pair of keys, Public and Private.
Now in Magento root or open ~/.composer/auth.json
and put following lines
{
"http-basic": {
"repo.magento.com": {
"username":"<your public key>",
"password":"<your private key>"
}
}
}
You are good to go. Remember auth.json
file contains standard json if you see any error just make sure that your auth file contains valid json, you can validate your json on JsonLint
If you don't want to add this information in above mentioned file (although it is handy, you don't need to open Marketplace dashboard repeatedly), then on run time just enter your Public key as username and Private key as your password, if you didn't add pair of keys in auth.json
in previous step, don't worry Magento will ask you here whether to store this information or not, the choice is yours! :)