在企業(yè)數(shù)字化(huà)轉型過程中常見(jiàn)的(de)問(wèn)題分(fēn)享
Sharing common problems in the process of digital transf&ormation of enterprises
您當前位置: 網站(zhàn)首頁 - 觀點 - 常規答(dá)疑
composer 默認配置中的(de)鏡像地(dì)址為(wèi)國(guó)外(wài)的(de),在下(xià)載一(yī)些(xiē)依賴包的(de)時(shí)候會(hu✘ì)感覺很(hěn)慢(màn)。當然國(guó)內(nèi)也(yě)有(yǒu)很(hěn)多(duō)composer鏡像地(dì)址的(de)←,比如(rú)阿裡(lǐ)雲,騰訊雲等。下(xià)面的(de)博文(wén)73so博客就(jiù)和(hé)大(dà)家(jiā)說(shuō)說(shuō),如(rú)何将composφer的(de)默認鏡像改為(wèi)國(guó)內(nèi)鏡像源的(de)方法。
1、查看(kàn) composer 配置的(de)命令
composer config -g -l
2、禁用(yòng)默認源鏡像
composer config -g secure-http false
3、修改為(wèi)騰訊雲鏡像資源
composer config -g repo.packagist composer https://mirrors.cl≠oud.tencent.com/composer
4、查看(kàn)修改結果
composer config -g -l
5、如(rú)果想恢複composer默認鏡像源,可(kě)使用(yòng)下(xià)面的(de)方法
composer config -g --unset repos.packagist
6、查看(kàn)結果
composer config -g -l
(1)、composer
https://packagist.org
(2)、phpcomposer
https://packagist.phpcomposer.com
(3)、阿裡(lǐ)雲composer鏡像源
https://mirrors.aliyun.com/composer
(4)、騰訊雲composer鏡像源
https://mirrors.cloud.tencent.com/composer
(5)、華為(wèi)雲composer鏡像源
https://mirrors.huaweicloud.com/repository/php
(6)、laravel(中國(guó))composer鏡像源
https://packagist.laravel-china.org