composer命令工具

2019-03-23  本文已影响0人  王怀智
  1. 添加国内镜像,加快下载速度
    composer config -g repo.packagist composer https://packagist.phpcomposer.com
    敲黑板::也可以添加Laravel镜像
    composer config -g repo.packagist composer https://packagist.laravel-china.org

  2. 切换到默认地址
    composer config -g repo.packagist composer https://packagist.org

  3. 今天用composer工具安装第三方库,然后composer install一直报错。

[Composer\Downloader\TransportException]
Invalid credentials for 'https://packagist.phpcomposer.com/p/provider-2016%24ae19026fd0d5a3d5733e5a46202305c96ff2ae
1ccd7988bb88c5fa2a7e490f7d.json', aborting.

解决过程:


  1. 清理缓存
    composer clear-cache

最后终于可以顺利安装第三方库了。

上一篇 下一篇

猜你喜欢

热点阅读