我想在我的私人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行末尾的逗號後執行的。那麼,爲什麼它不適合你? –