composer not connect or install the plug unresponsive

Phenomenon: the following tips when using the composer intended conditions install plug-ins:
1.content-length mismatch
2. composer http://packagist.org could not be fully loaded
 
The reason : A possible reason is that the installation package URL composer's foreign image caused by the Great Firewall blocked. Execute the following command to resolve:

1. Modify for domestic mirror

(1) composer config -g repo.packagist composer https://packagist.phpcomposer.com
(2)阿里云镜像:composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

2. Re-load plugins php composer.phar require --prefer-dist plugin name

composer http://packagist.org could not be fully loaded

Guess you like

Origin www.cnblogs.com/phplzx/p/12320360.html