我正试图在我的私有GitLab存储库中获得一个模块的开发版本。
使用我在其他答案中发现的内容,我的项目的composer.json是:
{
"repositories": [
{
"type": "composer",
"url": "https://git.amh.net.au"
},
{
"type": "package",
"package": {
"name": "amh-framework/amh-framework",
"version": "dev-develop",
"type": "package",
"source": {
"url": "git.amh.net.au:/var/opt/gitlab/git-data/repositories/amh-framework/amh-framework.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
"amh-framework/amh-framework": "dev-develop",
}
}但是当我运行composer update时,它会抛出一个RuntimeException:
Failed to execute git clone --no-checkout '' '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && cd '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && git remote add composer '' && git fetch composer
fatal: repository '' does not existcomposer update -vvv的输出是:
Resolving dependencies through SAT
Dependency resolution completed in 0.001 seconds
- Installing amh-framework/amh-framework (dev-develop 4d135f4)
Executing command (CWD): git --version
Cloning 4d135f4b01dc896ffc722d8e24cc106d38cb4602
Executing command (CWD): git clone --no-checkout '' '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && cd '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && git remote add composer '' && git fetch composer
Executing command (CWD): git --version
Failed: [RuntimeException] Failed to execute git clone --no-checkout '' '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && cd '/var/checkouts/reports/reporter/vendor/amh-framework/amh-framework' && git remote add composer '' && git fetch composer
fatal: repository '' does not exist因此,它似乎确实检查了回购以获得最新的提交(4d135f4b01dc896ffc722d8e24cc106d38c4602)--但在克隆时失败了。
我可以手动克隆该项目,因此它似乎不是权限:
git clone git.amh.net.au:/var/opt/gitlab/git-data/repositories/amh-framework/amh-framework.git我能做些什么来解决这个问题?
发布于 2016-10-20 01:53:08
问题在于存储库的排序--我们使用讽刺作为私有包服务器。出于某种原因,讽刺说开发主分支是可用的,但是不能正确地提供它(不过,它适用于标记)。
通过更改文件,使git列在satis之前,它可以工作:
{
"repositories": [
{
"type": "vcs",
"url": "git@git.amh.net.au:amh-framework/amh-test.git"
},
{
"type": "composer",
"url": "https://svn.amh.net.au:8002"
}
],
"require": {
"amh-framework/amh-test": "dev-master"
}
}发布于 2016-10-19 12:40:45
根据作曲家文献的说法,你所需要的只是:
{
"require": {
"amh-framework/amh-framework": "dev-develop"
},
"repositories": [
{
"type": "vcs",
"url": "git@git.amh.net.au:/var/opt/gitlab/git-data/repositories/amh-framework/amh-framework.git"
}
]
}确保在版本中使用实际的分支。
发布于 2016-10-19 16:17:07
git clone ''
fatal: repository '' does not exist在上面的例子中,Composer试图克隆一个不存在的存储库。
git克隆-不结帐
所以,也许在您的composer.json文件中,您的url是空的。
另外,我在上面的composer.json文件中发现了至少两个问题。
错误:在第1行解析错误:“存储库”:{ "type":"packa -“packa 错误:解析第17行的错误:...k":"dev-develop",}-}-}
https://stackoverflow.com/questions/40120795
复制相似问题