gpt4 book ai didi

GitHub composer 包 - 最低稳定性

转载 作者:行者123 更新时间:2023-12-04 11:24:14 28 4
gpt4 key购买 nike

我的包在 Giblab 的私有(private)存储库中工作,在 Github 中导入后它不起作用,
当我尝试要求它时,出现错误:

[InvalidArgumentException] Could not find a matching version of package lib_externe/XXX. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability ( dev).



这是我的包 composer.json :
{
"name": "lib-externe/XXX",
"description": "Lib metier V4",
"license": "proprietary",
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0"
}
}

前面的 Composer.json 是:
{
"repositories": {
"lib_externe": {
"type": "git",
"url": "https://xxx:yyy@github.com/zzz/zzz.lib_externe.git"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"lib-externe/XXX": "dev-master",
}
}

我尝试添加我以前没有的那两行,但这没有帮助:
  "minimum-stability": "dev",
"prefer-stable": true,

另一个有趣的事情是,如果我删除了供应商目录和 composer.lock,并且如果我进行了 composer 安装,它就会工作,并且我会在供应商中看到我的 lib-externe 文件夹。但是在不可能要求之后(此命令在 gitlab 中工作):
composer require lib_externe/XXX:dev-master

当我执行此命令行时,出现“最小稳定性”错误。
例如,我用@dev 尝试了很多不同的变体,但没有任何帮助

详细模式:
...
Reading composer.json of lib-externe/XXX (wip/HJ_ms_url_landing_maker)
Reading /root/.composer/cache/repo/XXXXXXXXXXXXXXXX from cache
Importing branch wip/HJ_ms_url_landing_maker (dev-wip/HJ_ms_url_landing_maker)
Downloading https://repo.packagist.org/packages.json
Writing /root/.composer/cache/repo/https---repo.packagist.org/packages.json into cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2013.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2014.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2015.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2016.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2017.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2018.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2018-04.json from cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2018-07.json from cache
Downloading http://repo.packagist.org/p/provider-2018-10%24ea06f25637c1c602d41ed345c80a660576d10be05261f8108e936462757cdd1f.json
Writing /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2018-10.json into cache
Downloading http://repo.packagist.org/p/provider-2019-01%2489609fdd5aed8f456ecfe99afda1ac8b789147473448122af24d6c5104615a76.json
Writing /root/.composer/cache/repo/https---repo.packagist.org/p-provider-2019-01.json into cache
Reading /root/.composer/cache/repo/https---repo.packagist.org/p-provider-archived.json from cache
Downloading http://repo.packagist.org/p/provider-latest%249fafea8edeb232d8a026fe8fd8d1cbacbc6be44e759a39ed975e02facb658be1.json
Writing /root/.composer/cache/repo/https---repo.packagist.org/p-provider-latest.json into cache
Downloading https://packagist.org/search.json?q=lib_externe/XXX&type=


[InvalidArgumentException]
Could not find a matching version of package lib_externe/XXX. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (
dev).


Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Command/InitCommand.php:740
...

我尝试“ Composer 清除缓存”
如果我在 composer.json 的“url”存储库中克隆 URL,它会正确克隆,并且在登录详细模式下,我会看到我的所有分支(包括主分支)
如果我检查缓存文件,我会看到包 composer.json :
{"name":"lib-externe\/XXX","description":"Lib metier V4","license":"proprietary","minimum-stability":"dev","require":{"php":">=5.4.0"},"time":"2018-04-16T10:40:23+00:00"}

我没有标签,如果可能的话,我想暂时不要使用它们!

直到现在在 Gitlab 中它都是这样工作的,

谢谢 !

最佳答案

问题只是包名错误('_' 而不是 '-'):

composer require lib_externe/XXX:dev-master

正确名称是:
composer require lib-externe/XXX:dev-master

关于GitHub composer 包 - 最低稳定性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55288302/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com