创建 LaraBBS 应用时报错 Composer\Repository\RepositorySecurityException 怎么解决?

问答 johnli ⋅ 于 3个月前 ⋅ 最后回复由 johnli 3个月前 ⋅ 279 阅读
vagrant@homestead:~/Code$ composer config -g repo.packagist composer https://packagist.laravel-china.org
vagrant@homestead:~/Code$ composer create-project laravel/laravel larabbs --prefer-dist "5.5.*"
Installing laravel/laravel (v5.5.28)
  - Installing laravel/laravel (v5.5.28): Loading from cache
Created project in larabbs
> [@php](https://laravel-china.org/users/10050) -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Updating dependencies (including require-dev)

  [Composer\Repository\RepositorySecurityException]
  The contents of https://packagist.laravel-china.org/p/illuminate/support%24e383b6a14d7c62cdfaa02bc808877cc0465ca491cf4c337ae1a30cf7e5b45f15.json do not match its signature. This should indicate a man-in-the-middle attack. Try running
   composer again and report this if you think it is a mistake.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]

vagrant@homestead:~/Code$

本文章首发在 Laravel China 社区
成为第一个点赞的人吧 :bowtie:
最佳答案
  • Summer MOD A Life-long learner. 4
    3个月前

    @扣丁禅师 Composer 镜像有点问题。

    @johnli 可以暂时换一个镜像试试:

    $ composer config -g repo.packagist composer https://packagist.phpcomposer.com
回复数量: 2
  • Summer MOD A Life-long learner. 4
    3个月前

    @扣丁禅师 Composer 镜像有点问题。

    @johnli 可以暂时换一个镜像试试:

    $ composer config -g repo.packagist composer https://packagist.phpcomposer.com
  • johnli
    3个月前

    @Summer 换了镜像后试过没有问题。感谢快速响应!

暂无评论~~
您需要登陆以后才能留下评论!

Composer 中国全量镜像

Top 100 扩展包

Lumen 中文文档

Laravel 速查表

Laravel 中文文档

Laravel 项目开发规范

Laravel 开发环境部署

社区文档撰写指南

TDD 构建 Laravel 论坛笔记

PHP PSR 标准规范

PHP 设计模式全集

Dingo API 中文文档