I've created my uninstall class/script.
After installing my sample module using composer I can see the module working.
Then, I try to uninstall the module using:
bin/magento module:uninstall Barbanet_SampleModule
And I see this message:
You are about to remove code and/or database tables. Are you sure?[y/N]y
Enabling maintenance mode
You are about to remove a module(s) that might have database data. Do you want to remove the data from database?[y/N]y
You are removing data without a database backup.
Removing data of Barbanet_SampleModule
Removing Barbanet_SampleModule from module registry in database
Removing Barbanet_SampleModule from module list in deployment configuration
Removing code from Magento codebase:
Then I press enter a few times I got this message:
Command "remove" failed: Loading composer repositories with package information
Authentication required (repo.magento.com):
Username: Password:
[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/packages.json', aborting.
remove [--dev] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [packages1] ... [packagesN]
Please disable maintenance mode after you resolved above issues.
My module was removed from composer.json, also was deleted from the steup_module table and also the custom table was deleted from the database.
My composer keys are stored at my personal auth.json file too.
Someone knows why I'm getting this message and why the uninstall process isn't finishing correctly.