I am trying to migrate magento to 2.0.2. I successfully installed both magento and 2.0.2.

I've installed composer using install composer: php -r "readfile('https://getcomposer.org/installer');" | php .

Then i am tried to install Data Migration Tool via git using php composer.phar config repositories.data-migration-tool git https://github.com/magento/data-migration-tool .

It shows this error:

./composer.json has been updated
Loading composer repositories with package information
Installation failed, reverting ./composer.json to its original content
Failed to clone https://github.com/magento/data-migration-tool, git was not found, check that is installed and in your PATH env.
'git' is not recognized as an internal or external command, operable program or batch file.
require [--dev][--prefer-source][--prefer-dist][--no-progress][--no-update][--update-no-dev][--update-with-dependencies][--ignore-platform-reqs][--sort-packages][-o|--optimize-autoloader][-a|--classmap-authoritative][--][<packages>]..

What was wrong and how to solve this.


The problem in this case is that git is not installed on your machine

To install it I reckon you should follow the official documentation

| improve this answer | |

First install git using this command,

  • sudo apt install git-all

Now to install Data Migration Tool using this command,

- composer update
- composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
- composer require magento/data-migration-tool:2.0.2
- php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/ce-to-ce/
- php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/ce-to-ce/

In above code, Please replace with your Magento1 version.

After completed your migration process, execute this command,

- php bin/magento cache:flush
- php bin/magento indexer:reindex

I hope this will work for you.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.