The "https://packagist.laravel-china.org/packages.json" file could not be downloaded

问题摘要:

The "https://packagist.laravel-china.org/packages.json" file could not be downloaded

最近用Composer同步时一直失败,并出现下面的错误信息

D:\xampp\htdocs\qfsoft>composer require jasig/phpcas
The "https://packagist.laravel-china.org/packages.json" file could not be downloaded: Peer certifica
te 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 t
he local cache and may be out of date


  [Composer\Downloader\TransportException]
  The "https://packagist.laravel-china.org/p/jasig/phpcas%24bd745d7849ad47969d06f11deb742ebbf8bdb
  96c9b07515d924fa78be61974b8.json" file could not be downloaded: Peer certificate CN=`*.phphub.o
  rg' did not match expected CN=`packagist.laravel-china.org'
  Failed to enable crypto
  failed to open stream: operation failed


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no
-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-
platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|
--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

在搜索后,得到解决方法:

D:\xampp\htdocs\qfsoft>composer config repo.packagist composer https://packagist.phpcomposer.com

在该目录下执行此命令即可。

上述参考文章:https://blog.csdn.net/myhuashengmi/article/details/53414260

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值