I am trying to install a module which i created in magento 2 via composer, I have hosted the module on the bitbucket repository, and added the repository url in magento's composer.json, When i try to install the module using the following
composer require package/module
The prompt asks for username and password for
repo.magento.com
I know that this is not the repository from which i need to download the module, but to proceed further i need to provide the username and password which i suppose are the same we use to login for https://www.magentocommerce.com/magento-connect/
But somehow it gives the following error
E:\wamp\www\m2final>composer require package/module
You are running composer with xdebug enabled. This has a major impact on runtime
performance. See https://getcomposer.org/xdebug
Authentication required (repo.magento.com):
Username: [email protected]
Password:
[Composer\Downloader\TransportException]
Invalid credentials for 'https://repo.magento.com/packages.json', aborting.
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] [--] [<packag
es>]...`
-----EDIT-----
After Clearing the above problems, i ran into another trouble, this has to do something with my repository structure,
I have created the repository names Magento Repository
, and added the repository url in magento's composer.json
when i run the command composer require package/module
i get the following error
[InvalidArgumentException]
Could not find package package/module at any version for your minimum-stability
(alpha). Check the package spelling or your minimum-stability
This is my module's directory structure in bitbucket
The folders in are directly created in the repository root
This is my Module's composer.json
{
"name": "package/module",
"description": "A Magento 2 module that creates a new page",
"type": "magento2-module",
"version": "1.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"extra":{
"map":[
[
"*",
"Package/Module"
]
]
},
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/framework": "~1.0.0"
},
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"Package\\Module\\": ""
}
}
}