问答详情
源自:1-3 Composer中国全量镜像

composer中文镜像配置失败!帮忙看看

bogon:~ apple$ composer config -g repo.packagist


                                            

  [InvalidArgumentException]                

  There is no packagist repository defined  

                                            


config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...


bogon:~ apple$ composer config -g repo.packagist composer https://packagist.phpcomposer.com

bogon:~ apple$ composer config -g repo.packagist


                                            

  [InvalidArgumentException]                

  There is no packagist repository defined  

                                            


config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...


bogon:~ apple$ config -gl

-bash: config: command not found

bogon:~ apple$ composer config -g repo.packagist composer https://packagist.phpcomposer.com

bogon:~ apple$ composer config -g repo.packagist


                                            

  [InvalidArgumentException]                

  There is no packagist repository defined  

                                            


config [-g|--global] [-e|--editor] [-a|--auth] [--unset] [-l|--list] [-f|--file FILE] [--absolute] [--] [<setting-key>] [<setting-value>]...


bogon:~ apple$ composer config -g repo.packagist composer https://packagist.phpcomposer.com

bogon:~ apple$ config -gl

-bash: config: command not found

bogon:~ apple$ 

请问我这边怎么都是 not found呀?都找不到这个东西存在。是不是哪里没配置好还是怎么滴?帮忙帮忙呀!

提问者:_莫凡 2017-01-06 20:11

个回答

  • simpleTravel
    2017-01-11 18:14:33

    bogon:~ apple$ config -gl    你的命令是错误的格式是错误的

    应该为 composer  config -gl

    查看是否有 [repositories.packagist.org.url] https://packagist.phpcomposer.com