I have single private repository hosted on Bitbucket (as they offer it for free).
I added it to my composer.json as below:
{
"type": "vcs",
"url": "https://[email protected]/user/myprivaterepo.git"
}
Then I ran install:
PS D:\dev\htdocs> php .\composer.phar install -v
Loading composer repositories with package information
[RuntimeException]
Failed to clone https://[email protected]/user/myprivaterepo.git, could not read packages from it
fatal: Authentication failed
Exception trace:
() at phar://D:/dev/htdocs/composer.phar/src/Composer/Repository/Vcs/GitDriver.php:61
Composer\Repository\Vcs\GitDriver->initialize() at phar://D:/dev/htdocs/composer.phar/src/Composer/Repository/VcsRepository.php:73
Composer\Repository\VcsRepository->getDriver() at phar://D:/dev/htdocs/composer.phar/src/Composer/Repository/VcsRepository.php:95
Composer\Repository\VcsRepository->initialize() at phar://D:/dev/htdocs/composer.phar/src/Composer/Repository/ArrayRepository.php:158
Composer\Repository\ArrayRepository->getPackages() at phar://D:/dev/htdocs/composer.phar/src/Composer/DependencyResolver/Pool.php:141
Composer\DependencyResolver\Pool->addRepository() at phar://D:/dev/htdocs/composer.phar/src/Composer/Installer.php:252
Composer\Installer->doInstall() at phar://D:/dev/htdocs/composer.phar/src/Composer/Installer.php:180
Composer\Installer->run() at phar://D:/dev/htdocs/composer.phar/src/Composer/Command/InstallCommand.php:70
Composer\Command\InstallCommand->execute() at phar://D:/dev/htdocs/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Comma
nd.php:239
Symfony\Component\Console\Command\Command->run() at phar://D:/dev/htdocs/composer.phar/vendor/symfony/console/Symfony/Component/Console/Applica
tion.php:193
Symfony\Component\Console\Application->doRun() at phar://D:/dev/htdocs/composer.phar/src/Composer/Console/Application.php:96
Composer\Console\Application->doRun() at phar://D:/dev/htdocs/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:10
6
Symfony\Component\Console\Application->run() at phar://D:/dev/htdocs/composer.phar/src/Composer/Console/Application.php:72
Composer\Console\Application->run() at phar://D:/dev/htdocs/composer.phar/bin/composer:37
require() at D:\dev\htdocs\composer.phar:15
install [--prefer-source] [--dry-run] [--dev] [--no-custom-installers] [--no-scripts] [-v|--verbose]
It works perfectly when I add my SSH key to Bitbucket deployment keys or I change composer.json to:
{
"type": "vcs",
"url": "https://[email protected]/user/myprivaterepo.git"
}
But I don't want to store plain text passwords in compser.json
This is a duplicate of #482, but if it works with your ssh key I would recommend just using that for now.
Why is this closed "I would recommend just using that for now" doesn't works as a solution by far.
I have a server that has disbled the connections on the that port so SSH it's not an option!