如何修复“当istall laravel框架错误:无法下载文件:打开流失败:HTTP请求失败!”

我正在尝试使用composer将laravel框架安装到我的办公室计算机上,但是总是会出现此错误,并且安装失败。

我们在办公环境中有一个代理,因此在安装Composer时将其插入Composer。但这一次又一次地发生。

updating composer
clear cache 
composer diagnosing 

F:\xampp\htdocs>composer config -g repo.packagist composer https://packagist.org

F:\xampp\htdocs>composer create --prefer-dist laravel/laravel blog
Installing laravel/laravel (v6.4.0)
  - Installing laravel/laravel (v6.4.0): Downloading (failed)
Downloading (failed)
Downloading (failed)    Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/953b488b8bb681d4d6e12227645c7c1b7ac26935" file could not be downloaded: SSL: An existing connection was forcibly closed by the remote host.

send of 233 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.

failed to open stream: HTTP request failed!
    Now trying to download from source
  - Installing laravel/laravel (v6.4.0): Cloning 953b488b8b


  [RuntimeException]
  Failed to clone https://github.com/laravel/laravel.git via https,ssh protocols,aborting.

  - https://github.com/laravel/laravel.git
    Cloning into 'F:\xampp\htdocs\blog'...
    fatal: unable to access 'https://github.com/laravel/laravel.git/': Unknown SSL protocol error in connection to gi
  thub.com:443

  - git@github.com:laravel/laravel.git
    Cloning into 'F:\xampp\htdocs\blog'...
    ssh_exchange_identification: read: Connection reset by peer
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.


create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]


F:\xampp\htdocs>
bxkanh 回答:如何修复“当istall laravel框架错误:无法下载文件:打开流失败:HTTP请求失败!”

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3169349.html

大家都在问