我需要为几个包使用 http composer 注册表:
...
"repositories":[
{"type":"composer", "url":"http://<url>"}
],
"secure-http":false,
...
但是当我试图
composer update
要更新锁定文件,我得到:[Composer\Downloader\TransportException]
Your configuration does not allow connection to http://<url>.
See https://getcomposer.org/doc/06-config.md#secure-http for details.
通过响应 url,我找到了下一个信息;
secure-http#
Defaults to true.
If set to true only HTTPS URLs are allowed to be downloaded via Composer.
If you really absolutely need HTTP access to something then you can disable it ...
所以我很困惑我做错了什么。
最佳答案
错误 composer.json
结构体。 secure-http
必须在 config
部分:
{
...,
"config":{
...,
"secure-http":false,
...
}
...
}
关于composer-php - composer.json 中的安全 http 标志不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36151172/