解决:The “https://packagist.laravel-china.org/packages.json” file could not be downloaded
程序员文章站
2022-06-24 20:34:03
...
使用composer安装错误提示:
The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: Peer certificate CN=
*.phphub.org' did not match expected CN=
packagist.laravel-china.org'
Failed to enable crypto
failed to open stream: operation failed
https://packagist.laravel-china.org could not be fully loaded, package information was loaded from the local cache and may be out of date
阿里云 Composer 全量镜像【下载速度超快,亲测~】
全局配置(推荐)
所有项目都会使用该镜像地址:
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
取消配置:
composer config -g --unset repos.packagist
项目配置
- 仅修改当前工程配置,仅当前工程可使用该镜像地址:
composer config repo.packagist composer https://mirrors.aliyun.com/composer/
- 取消配置:
composer config --unset repos.packagist
调试
- composer 命令增加 -vvv 可输出详细的信息,命令如下:
composer -vvv require alibabacloud/sdk
亲测有效~~~~~
上一篇: [转]composer update报错: The "https://packagist.phpcomposer.com/p/xxx file could not be downloaded
下一篇: 解决composer install遇到:No lock file found.。。 Your requirements could not be resolved to an installable
推荐阅读
-
composer update报错: The "https://packagist.phpcomposer.com/p/xxx file could not be downloaded
-
[转]composer update报错: The "https://packagist.phpcomposer.com/p/xxx file could not be downloaded
-
解决:The “https://packagist.laravel-china.org/packages.json” file could not be downloaded
-
composer 安装tp5报:file could not be downloaded (HTTP/1.1 404 Not Found) 解决办法