在阻止出站 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
有没有办法指示作曲家使用 https 连接到包装师?
我在 1.2.0 和 1.6.5 版本的作曲家中都遇到了这个问题。
您可以通过以下方式强制作曲家使用 https:
composer config -g repo.packagist composer https://packagist.org
或者你可以在你的 composer.json 文件中设置:
"repositories": [
{
"type": "composer",
"url": "https://packagist.org"
},
{ "packagist": false }
]
来源:作曲家的 github 存储库上的问题 #5656。