首页 > 解决方案 > 使用 php composer.phar 通过 SSH 安装供应商失败

问题描述

我想通过 SSH 从 composer.json 和 composer.lock 文件安装供应商

php composer.phar 安装

Installing dependencies (including require-dev) from lock file
Package operations: 43 installs, 0 updates, 0 removals
  - Installing doctrine/lexer (v1.0.1): Downloading (failed)       
Downloading (failed)       
Downloading (failed)    Failed to download doctrine/lexer from dist: 
The "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Failed to enable crypto
failed to open stream: operation failed
    Now trying to download from source
  - Installing doctrine/lexer (v1.0.1): Cloning 83893c552f...

标签: phpsshopensslcomposer-phpsymfony-3.4

解决方案


它是一个 OVH 配置(文件:.ovhconfig),通过将 container.image 替换为 stable : (container.image=stable)


推荐阅读