【问题标题】:Cannot install laravel/socialite using composer behind proxy无法使用代理后面的作曲家安装 laravel/socialite
【发布时间】:2015-09-12 23:27:17
【问题描述】:

我用的是win7x64。

当我不在代理后面时,我可以使用 composer 安装 laravel,但是当我在代理后面时,我无法使用 composer 安装任何东西。

我尝试安装 laravel/socialite 我收到错误:

"http://packagist.org/p/provider-2013$64cefc090dc586bcea264a3e17529dfa29b16b 2bf50c52626562f13772982949.json”文件无法下载:失败 打开 st ream:HTTP 请求失败! http://packagist.org 不能 完全加载,包信息是从本地缓存中加载的 并且可能已经过时了

[Composer\Downloader\TransportException] "http://packagist.org/p/laravel/socialite$d9a828b00026fe40a14532c7f93e7 adc78725a74da02a035cd267618876c312a.json”文件不能 已下载:fai 导致打开流:HTTP 请求失败!

需要 [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [packages1] ... [包N]

我有 http_proxy 和 https_proxy 环境设置。

composer selfupdate 正在运行

但是

作曲家更新不起作用

使用包信息加载作曲家存储库更新 依赖项(包括 require-dev) "http://packagist.org/p/provider-2013$64cefc090dc586bcea264a3e17529dfa29b16b 2bf50c52626562f13772982949.json”文件无法下载:失败 打开 st ream:HTTP 请求失败! http://packagist.org 不能 完全加载,包信息是从本地缓存中加载的 并且可能已过时 无需安装或更新 自动加载文件生成优化的类加载器

其他 cli(例如 gem)正在工作

我试过了 this solution

但是还是不行

这里是作曲家诊断统计:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json
" file could not be downloaded: failed to open stream: HTTP request failed!
Checking https connectivity to packagist: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe packagist.org is down (The "http://packagi
st.org/packages.json" file could not be downloaded: failed to open stream: HTTP
request failed! )
Checking HTTPS proxy support for request_fulluri: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK

我错过了什么设置吗?

【问题讨论】:

    标签: php laravel-5 composer-php command-line-interface windows-7-x64


    【解决方案1】:

    我将它添加到 composer.json

    "repositories": [
        {
            "packagist": false
        },
        {
            "type": "composer",
            "url": "https://packagist.org/"
        }
    ],
    

    此解决方案来自: https://github.com/composer/composer/issues/1992

    【讨论】:

      猜你喜欢
      • 2017-06-13
      • 2020-03-29
      • 2018-12-30
      • 2017-07-06
      • 2016-12-01
      • 2018-02-13
      • 2013-06-21
      相关资源
      最近更新 更多