compsoer Your configuration does not allow connections to http://packagist.phpcomposer.com/package

文章目录

场景

  • 上古时期的一个项目, 现在需要维护
    • 环境 thinkphp3.2
    • php5.5.30
  • 安装一个package 报错

分析

  • 根据提示查看composer.json
{
    "name": "topthink/thinkphp",
    "description": "the ThinkPHP Framework",
    "type": "framework",
    "keywords": ["framework","thinkphp","ORM"],
    "homepage": "http://thinkphp.cn/",
    "license": "Apache2",
    "authors": [
        {
            "name": "liu21st",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.3.0",
        "illuminate/support": "v5.0.0"
    },
    "minimum-stability": "dev",
    "repositories": [
        {"type": "composer", "url": "http://packagist.phpcomposer.com"},
        {"packagist": false}
    ]
}
  • 问题是 {"type": "composer", "url": "http://packagist.phpcomposer.com"}, 现在packagist 在使用https协议了, 所以链接http是链接不上的

解决

猜你喜欢

转载自blog.csdn.net/cominglately/article/details/82850148