当在阻止出站http请求的环境中构建文件时,我会得到如下错误:
Updating dependencies (including require-dev) The "http://packagist.org/p/provider-2013%ahash.json" file could not be downloaded: failed to open stream: Connection timed out http://packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
有什么方法可以指示composer使用https连接到packagist吗?
我在1.2.0和1.6.5版本的composer中都经历过这个问题。
发布于 2019-12-21 19:41:52
您可以通过以下方法强制composer使用https:
composer config -g repo.packagist composer https://packagist.org或者您可以在composer.json文件中设置:
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{ "packagist": false }
]https://stackoverflow.com/questions/51158850
复制相似问题