全局配置(推荐)
所有项目都会使用该镜像地址:
<span class="com">//阿里云</span>
<span class="com">//使用说明:https://mirrors.aliyun.com/composer/</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repo</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//mirrors.aliyun.com/composer/ </span>
<span class="com">//华为云</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repo</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//mirrors.huaweicloud.com/repository/php/ </span>
<span class="com">//腾讯云</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repos</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//mirrors.cloud.tencent.com/composer/ </span>
<span class="com">//laravel-china</span>
<span class="com">//使用说明:https://packagist.laravel-china.org/</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repos</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//packagist.laravel-china.org </span>
<span class="com">//cnpkg</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repos</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//php.cnpkg.org</span>
<span class="com">//phpcomposer</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repo</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//packagist.phpcomposer.com</span>
<span class="com">//交通大学</span><span class="pln">
composer config </span><span class="pun">-</span><span class="pln">g repos</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//packagist.mirrors.sjtug.sjtu.edu.cn</span>
取消配置:
<span class="pln">composer config </span><span class="pun">-</span><span class="pln">g </span><span class="pun">--</span><span class="pln">unset repos</span><span class="pun">.</span><span class="pln">packagist</span>
项目配置
仅修改当前工程配置,仅当前工程可使用该镜像地址:
<span class="pln">composer config repo</span><span class="pun">.</span><span class="pln">packagist composer https</span><span class="pun">:</span><span class="com">//mirrors.aliyun.com/composer/</span>
取消配置:
<span class="pln">composer config </span><span class="pun">--</span><span class="pln">unset repos</span><span class="pun">.</span><span class="pln">packagist</span>
调试
composer 命令增加 -vvv 可输出详细的信息,命令如下:
<span class="pln">composer </span><span class="pun">-</span><span class="pln">vvv </span><span class="kwd">require</span><span class="pln"> alibabacloud</span><span class="pun">/</span><span class="pln">sdk</span>
官网:
最新评论
十塊年費是直接從這張卡裡的外幣按匯率扣?
有人申请成功了吗?我的已经两天了,没有消息,没有收到成功邮件。信用卡扣了款!