My project uses my own library which is in the private mercurial repository placed on bitbucket.org. That library has no composer.json configured.
I try to make that library as a dependency to my project. And can't get it for the second day.
Firstly I wrote to composer.json the following strings:
{
"require": { "php": ">=5.4", "myname/mylibname": "dev" },
"repositories":[ { "type": "hg", "url" : "https://bitbucket.org/myname/mylibname" } ] }And running composer install I've got an error:
[RuntimeException]
Failed to clone https://bitbucket.org/myname/mylibname, could not read packages from it
abort: http authorization required
"type": "hg" to "type": "vcs" and got another error:[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of https://bitbucket.org/myname/mylibname,
could not load a package from it.
{ "require": { "php": ">=5.4", "myname/mylibname": "dev" },
"repositories":[ { "type": "vcs", "url" : "https://bitbucket.org/myname/mylibname" }, { "type":"package", "package":{ "name":"myname/mylibname", "version": "dev", "source":{ "type":"vcs", "reference":"dev" } } } ]
}[Composer\Repository\InvalidRepositoryException]
No valid composer.json was found in any branch or tag of https://bitbucket.org/myname/mylibname, could not load a package from it.
[InvalidArgumentException]
Unknown downloader type: vcs. Available types: git, svn, hg, perforce, zip, rar, tar, gzip, phar, file.
{ "require": { "php": ">=5.4", "myname/mylibname": "dev" }, "repositories":[
{ "type":"package", "package":{ "name":"myname/mylibname", "version": "dev", "source":{ "type":"hg", "reference":"dev" } } } ]
}[RuntimeException]
Failed to execute hg clone 'https://bitbucket.org/myname/mylibname' '/path/to/myproject'
abort: http authorization required
--
You received this message because you are subscribed to the Google Groups "composer-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to composer-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Christophe | Stof
{ "require": { "php": ">=5.4", "myname/mylib": "dev-dev" }, "repositories":[ { "type":"vcs", } ]}{ "name": "myname/mylib", "require": { "php": ">=5.4", "ext-phalcon": "1.3.2" }}As I mentioned, the installation finished successfully, library is downloaded properly, but that message about authorization failure means that either I am doing something wrong or there is a bug or there is no implementation for private mercurial repositories on bitbucket.Failed: [RuntimeException] Failed to execute hg clone 'https://bitbucket.org/myname/mylib' '/path/to/myproject/vendor/myname/mylib'
abort: http authorization required
Failed to download myname/mylib from source: Failed to execute hg clone 'https://bitbucket.org/myname/mylib' '/path/to/myproject/vendor/myname/mylib'
abort: http authorization required
Now trying to download from dist
- Installing myname/mylib (dev-dev 324f1d6)