我想在我的私人GitLab存储库中获取模块的开发版本。作曲家未能克隆git回购
使用我在other answers已经找到了,我的项目的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 exist
从composer 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
因此,它确实似乎ch eck回购得到最新的提交(4d135f4b01dc896ffc722d8e24cc106d38cb4602) - 但它在克隆时失败。
我可以手动克隆项目,所以它不会显得权限:
git clone git.amh.net.au:/var/opt/gitlab/git-data/repositories/amh-framework/amh-framework.git
我能做些什么来解决这个问题?
难道你完全composer.json文件或者你缺少什么事情?因为验证它作为json文件给我两个错误。 –
它现在更好吗现在我已经完全封闭了对象? – HorusKol
是的,它是在删除第17行末尾的逗号后执行的。那么,为什么它不适合你? –