How to install sample data in Magento after installation? – Clone SSH – Part 03

Here we’ll discuss another way to clone install Magento sample data GitHub repository by using SSH protocol.

Take it simple and join Aspiration Hosting to enjoy tech support round the year. As promised, any tech issues you have will be taken care of by expert coders with Magento cloud hosting plans. So no need to engage such tech issues like installing sample data. Rather buy a Mage hosting plan to enjoy premium tech service form us.

Tanzia Farin Chy for Aspiration Hosting

Install Magento sample data with SSH protocol

Similar to our earlier article, using any web browser, go to Mage sample repository.

Under the name of the branches select the SSH under list.

Now copy to clipboard.

Here is an example following:

install magento sample data

Install Magento sample data – Clone repository using SSH

First Jump in to the docroot directory of web server.

Mostly the path is for CentOS users is /var/www/html & /var/www / for Ubuntu.

Simply insert git clone. And also paste the obtained value we’ve got in the first step.

Following is an example:

git clone git@github.com:magento/magento2-sample-data.git

Further keep patience and give time to repository to clone on your server.

Here Note: Sometimes it might show the following error. For such instance ensure the SSH key is shared with GitHub. For example:

Cloning into 'magento2'...

Permission denied (pubkey).

fatal: The remote end hung up unexpectedly

Again here, jump to the <your Magento sample data clone dir>/dev/tools directory.

Right after that insert the following mentioned command to create a link (Symbolic). Now, the command links the cloned files and ensures the sample data works properly.

php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"

Hence keep patience till the process for symbolic linking completes.

Finally in the next article, we’ll setup permissions for file system owner for Mage in the next and the final part of the series.

Now reading Part 03 | Part 01 | Part 02 | Part 04