我在 Windows 中使用 ubuntu,当我运行 composer selfupdate
Composer 给我一个错误[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
这与 Windows 的 debian 中的错误相同。
但是当我运行 composer selfupdate
在windows的powershell上
我没有任何错误。
配置 ubuntuphp -v
PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
conf debianphp -v
PHP 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6 (cli) (built: Jun 11 2018 14:59:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6, Copyright (c) 1999-2018, by Zend Technologies
配置窗口
Windows 10 专业版
版本 1803
版本操作系统 17134.1php -v
PHP 7.0.23 (cli) (built: Aug 29 2017 06:13:57) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
最佳答案
尝试禁用您的防病毒软件,或尝试根据您使用的客户端将该连接列入白名单。
我已经在卡巴斯基遇到了这个问题。
一旦禁用,问题就消失了。
关于php - composer selfupdate 连接被对等方重置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51266332/