强制作曲家下载git repo而不是zip [英] Force composer to download git repo instead of zip
问题描述
require:{
php:> = 5.3.2,
kriswallsmith / buzz:0.7
},
回复 https://github.com/kriswallsmith/Buzz/tree/v0.7
不幸的是,github为此请求返回502 https:// github.com/kriswallsmith/Buzz/zipball/v0.7
请求URL:https://nodeload.github.com/kriswallsmith/Buzz/zipball /v0.7
状态码:502坏门户
幸运的是,git克隆仍然有效;)
是否可以告诉/问作曲家使用git clone而不是下载这个依赖关系的zipball?
最快捷的解决方案是运行 install 或
update
,选项 - prefer-source
php composer.phar install --prefer-source
通过这种方式,git clone将会用于所有依赖项,我不知道是否有设置仅限于一个依赖项。
I have some problem with composer.
"require": {
"php": ">=5.3.2",
"kriswallsmith/buzz": "0.7"
},
Repo https://github.com/kriswallsmith/Buzz/tree/v0.7
Unfortunately github returns 502 for this request https://github.com/kriswallsmith/Buzz/zipball/v0.7
Request URL:https://nodeload.github.com/kriswallsmith/Buzz/zipball/v0.7
Status Code: 502 Bad Gateway
Luckily git clone still works ;)
Is it possible to tell/ask composer to user git clone instead of downloading zipball for this one dependency?
The quickest solution is to run install
or update
with the option --prefer-source
php composer.phar install --prefer-source
In this way git clone will be used for all dependencies, I don't know if there's a setting to limit to one dependency only.
这篇关于强制作曲家下载git repo而不是zip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!