php - composer不知什麼原因,遇到https,就會報SSL: Handshake timed out,Google也沒結果
typecho
typecho 2017-06-10 09:47:35
0
5
3869
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Handshake timed out

執行: composer diagnose檢查顯示

[root@iZm5e5k2yby7w6yyixdif3Z .composer]# composer diagnose
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Handshake timed out
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL: Handshake timed out
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
  ssing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: 
                                                                                                 
  [Composer\Downloader\TransportException]                                                       
  The "https://getcomposer.org/versions" file could not be downloaded: SSL: Handshake timed out  
  Failed to enable crypto                                                                        
  failed to open stream: operation failed                                                        
                                                                                                 

diagnose

執行

 php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"

顯示

PHP Warning:  copy(): SSL: Handshake timed out in Command line code on line 1
PHP Warning:  copy(): Failed to enable crypto in Command line code on line 1
PHP Warning:  copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
typecho
typecho

Following the voice in heart.

全部回覆(5)
三叔

開啟php.ini, 將default_socket_timeout值調大。如:default_socket_timeout=360(預設為-1或60)

Peter_Zhu

我覺得這種奇怪的情況,要嘛

  • 翻牆

  • 使用國內 composer 鏡像

给我你的怀抱

換成國內鏡像試試

曾经蜡笔没有小新

試試用瀏覽器請求 https://install.phpcomposer.com/installer, 下載檔案後傳至伺服器 重新命名為composer-setup.php

学霸

就是網路差。或不通。 。 。

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板