我在网址http://packages.ex/上设置了一个令人满意的私人仓库,当我访问它时,会列出两个包:example/admin
和example/codebase
当我运行composer create-project example/codebase new-site --repository-url=http://packages.ex stability=dev
时,我收到错误:
[InvalidArgumentException]
Could not find package example/codebase with version stability=dev.
example / codebase中的composer.json如下所示:
{
"name": "example/codebase",
"description": "Example codebase.",
"keywords": ["codebase", "example"],
"homepage": "http://www.exampple.com",
"version": "0.1",
"repositories": [ { "type": "composer", "url": "http://packages.ex/" } ],
"authors": [
{
"name": "Example",
"email": "example@example.com"
}
],
"require": {
"php": ">=5.4.0",
"ext-mcrypt": "*",
"laravel/framework": "4.1.*",
"way/generators": "dev-master",
"example/admin": "dev-master"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "dev"
}
我不知道为什么当我在浏览器中访问私人仓库时,作曲家找不到包,我在composer.json中指定'minimum-stability': 'dev'
。
也许我错过了什么或做错了什么。有什么想法吗?
有没有办法运行命令行检查以查看composer是否可以访问特定包以及它具有哪些稳定性?
答案 0 :(得分:1)
您的repository-url参数中看起来有错误或拼写错误,而作曲家尝试在默认的packagist.org repo上找到包。