paj*_*ooh 10 ssl https composer-php
我的网络与https不兼容,所以这样做
composer.phar install
Run Code Online (Sandbox Code Playgroud)
投
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: Failed to enable crypto
failed to open stream: operation failed
Run Code Online (Sandbox Code Playgroud)
我用了
{
"packagist": false
},
{
"type": "composer",
"url": "http://packagist.org",
"options": {
"ssl": {
"verify_peer": "false"
}
}
}
Run Code Online (Sandbox Code Playgroud)
作为一个http falback,但它再次崩溃在其他一点:
Installing dependencies
- Installing symfony/translation (v2.4.0)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/symfony/Translation/zipball/0919e0fc709217f8c9e5049f2603419fdd4a34ff" file could not be downloaded: Failed to
enable crypto
failed to open stream: operation failed
Run Code Online (Sandbox Code Playgroud)
我的问题只是使用TLSv1,以前的SSL版本应该可以工作,因为浏览器可以正常工作.
我该怎么办,这个问题也存在于依赖于https的其他cmd工具中,比如npm,bower,git,curl,...
Gam*_*a.X 16
您可以使用composer.json关闭TLS(对于您的特定项目):
{
"require": {
"laravel/framework": "5.2.43"
},
"config": {
"preferred-install": "dist",
"disable-tls": true,
"secure-http": false
}
}
Run Code Online (Sandbox Code Playgroud)
注意:不要使用"disable-tls":在配置部分中为true.
hao*_*fly 16
composer config --global disable-tls true
composer config --global secure-http false
Run Code Online (Sandbox Code Playgroud)
Alf*_*Bez 10
问题很简单,就是您用"false"引号括起来,true当转换为bool.
使用"verify_peer": false而不是"verify_peer": "false":
{
"repositories": [
{
"type": "composer",
"url": "http://packagist.org",
"options": {
"ssl": {
"verify_peer": false
}
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
没关系。它会工作。您只是不匹配:
"options": {
"ssl": {
"verify_peer": false
}
}
Run Code Online (Sandbox Code Playgroud)
您无法使用 Composer 禁用 SSL。即使它像您的设置一样工作,您也无法控制您使用的任何包的源 URL。其中一些不提供 SSL,因此您必须使用 SSL。
我认为让 SSL 发挥作用是最好的主意。您尝试composer diag看看问题出在哪里吗?
| 归档时间: |
|
| 查看次数: |
37039 次 |
| 最近记录: |