【问题标题】:OpenSSl error using composer behind proxy on ubuntu在 ubuntu 上使用代理后面的作曲家时出现 OpenSSl 错误
【发布时间】:2019-05-23 16:08:49
【问题描述】:

当我尝试在 ubuntu 18.04 上运行 composer install 时,我得到了这个:

The "https://packagist.org/packages.json" file could not be downloaded: SSL  
operation failed with code 1. OpenSSL Error messages:                       
error:1408F10B:SSL routines:ssl3_get_record:wrong version number             
Failed to enable crypto                                                      
failed to open stream: operation failed

我在 /etc/apt/apt.conf 和 /etc/profile 上获得了正确的代理配置,但错误不断出现,我不知道该怎么做。

【问题讨论】:

    标签: proxy composer-php


    【解决方案1】:

    使用 composer 所需的代理配置位于 /etc/enviroment 文件中。

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
    
    http_proxy="http://username:password@10.4.1.20:3128"
    https_proxy="http://username:password@10.4.1.20:3128" 
    

    【讨论】:

      猜你喜欢
      • 2020-05-30
      • 2016-03-23
      • 2016-02-14
      • 2017-02-10
      • 2021-05-31
      • 2015-09-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多