Install Sample Data in Magento 2

1.1k Views Asked by At

I have tried a lot for install sample data in Magento 2. I am trying a new method, but still not getting success.

sudo php bin/magento sampledata:deploy

After apply this code i am getting this

./composer.json has been updated
Loading composer repositories with package information
    Authentication required (repo.magento.com):       
      Username: 

I dont know which username and password is asking here. I have generate token in my magento account. But what to do next and which user name and password to give there.

1

There are 1 best solutions below

0
On

You get following message

You are required to authenticate to complete the action. when you try to upgrade or install the sample data in Magento 2 using Composer method using following command.

php <your Magento install dir>/bin/magento sampledata:deploy

This is a new concept in Magento 2 for upgrades. You have to configure your keys in you Magento account under connect tab secure keys section. (As you have to access a repository)

You will find following excerpt from Magento official documentation :

The repo.magento.com repository, where Magento 2 and third-party component Composer packages are stored, requires authentication. To provide secure authentication, we enable you to generate a pair 32-character authentication tokens you can use to access the repository.

Please refer this Enter your authentication keys in the Admin