proxy - 在 ubuntu 上使用代理后面的作曲家时出现 OpenSSl 错误
问题描述
当我尝试在 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 上得到了正确的代理配置,但是错误一直在继续,不管我做什么。
解决方案
使用 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"
推荐阅读
- c# - C#如何从子类获取父类属性
- xpages - 我可以使用 Domino 服务器代理 HTTPS 请求吗?
- android - 将列表中的每个元素与列表中的其他元素进行比较
- php - Symfony 4:在测试 + 控制器 + 树枝扩展中保持 SQLite PDO 连接
- wordpress - WORDPRESS CORS 策略:请求的资源上不存在“Access-Control-Allow-Origin”标头
- vue.js - vue组件注册和路由
- javascript - 循环中的循环总增量,但之后打印时返回 0
- botframework - 是否可以在 Bot 框架自适应卡片输入中自动完成?
- f# - 在 F# 交互式中启动和管道处理诸如 gnuplot
- zurb-foundation - 我在运行 Foundation Watch 时遇到问题(gulp 错误) - /_input-group.scss