使用Composer下载第三方包时出现:

Authentication required (packagist.phpcomposer.com): Username:

解决方法:

1、修改源

composer config -g repo.packagist composer https://packagist.laravel-china.org

2、将composer.json文件中的repositories的地址改为

"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.laravel-china.org"
}
05-11 18:26