cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to deploy sample data using php composer

Not able to deploy sample data using php composer

I followed the online instruction and successfully installed Magento 2 without sample data by using PHP composer.

 

In the above process, I also authenticated to https://repo.magento.com and saved my credentials in ~HOME/.composer/auth.json

 

Now I want to deploy the sample data.

 

By following the instruction at:

http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data-after-magento.html

 

I do the following:

  • Go to the folder where I installed Magento2
  • Run the command "bin/magento sampledata:deploy"

Then I ran into the following error:

                                                                             

  [Composer\Downloader\TransportException]                                   

  The 'https://repo.magento.com/packages.json' URL required authentication. 

  You must be using the interactive console to authenticate                  

                                                                             

I followed the instruction and ran "composer update" and it doesn't ask me for any authentication information. However, I am still getting authentication error when try to deploy the sampledata module.

 

What is the reason behind?

4 REPLIES 4

Re: Not able to deploy sample data using php composer

You need to setup authentication in your auth.json file. Did you generate a key as specified here: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html

Re: Not able to deploy sample data using php composer

Yes, I setup authentication already during the installation of Magento2.

 

It's in the file ~HOME/.composer/auth.json

 

I also followed the instruction on the page and run "composer update" in the Magento installation folder, and the command runs successfully.

 

Thanks

Clarence

Re: Not able to deploy sample data using php composer

auth.json must be available in user's home directory.

 

 

/root/.composer/auth.json
/home/username/.composer/auth.json

 

something like this

------------
MagenX - Magento and Server optimization

Re: Not able to deploy sample data using php composer

Hi,

I finished magento 2.0 SW install successfully, I can login the store front and admin page, every thing looks fine.

 

When I tried to install sample data, I hit the exactly same problem.

 

Update: Now this is fixed.