Chr*_*ris 4 php git github composer-php docker
我composer install在我的本地环境和生产环境中运行,它们都失败了。这是今天才开始的。我已经查看了代码更改,并且 Composer 文件没有更改。任何人都可以对此有所了解......我不知道它可能是什么。我以为 github 宕机了,但我确实成功安装了一些软件包。我收到这样的错误:
...
- 安装 phpunit/php-timer (2.1.2): 下载 (100%)
- 安装 phpunit/php-text-template (1.2.1): 下载 (100%)
- 安装 phpunit/php-file-iterator (2.0.2): Downloading (0%) Failed to download phpunit/php-file-iterator from dist: could not authentication against github.com 现在尝试从源下载
- 安装 phpunit/php-file-iterator (2.0.2):从缓存中克隆 050bedf145
- 安装这些er/tokenizer(1.1.3):下载(0%)无法从dist下载这些er/tokenizer:无法对github.com进行身份验证现在尝试从源下载
- 安装这些er/tokenizer (1.1.3):从缓存中克隆 11336f6f84
- 安装 sebastian/code-unit-reverse-lookup (1.0.1):下载 (0%) 无法从 dist 下载 sebastian/code-unit-reverse-lookup:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装 sebastian/code-unit-reverse-lookup (1.0.1):从缓存中克隆 4419fcdb5e
- 安装 phpunit/php-code-coverage (6.1.4):下载 (0%) 无法从 dist 下载 phpunit/php-code-coverage:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装 phpunit/php-code-coverage (6.1.4):从缓存中克隆 807e6013b0
- 安装学说/实例化器 (1.3.0): 下载 (0%) 无法从 dist 下载学说/实例化器:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装学说/实例化器 (1.3.0):从缓存中克隆 ae466f7262
- 安装 phpspec/prophecy (v1.10.2):下载 (0%) 无法从 dist 下载 phpspec/prophecy:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装 phpspec/prophecy (v1.10.2):从缓存中克隆 b4400efc9d
- 安装 phar-io/version (2.0.1): Downloading (0%) Failed to download phar-io/version from dist: could not authentication against github.com 现在尝试从源下载
- 安装 phar-io/version (2.0.1):从缓存中克隆 45a2ec53a7
- 安装 phar-io/manifest (1.0.3):下载 (0%) 无法从 dist 下载 phar-io/manifest:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装 phar-io/manifest (1.0.3):从缓存中克隆 7761fcacf0
- 安装 myclas/deep-copy (1.9.5):下载 (0%) 无法从 dist 下载 myclas/deep-copy:无法对 github.com 进行身份验证 现在尝试从源下载
- 安装 myclas/deep-copy (1.9.5):从缓存中克隆 b2c28789e8
- 安装 phpunit/phpunit (7.5.20): Downloading (0%) Failed to download phpunit/phpunit from dist: could not authentication against github.com 现在尝试从源下载
- 安装 phpunit/phpunit (7.5.20):克隆 9467db479d
[Symfony\Component\Process\Exception\ProcessTimedOutException]
进程 "git clone --no-checkout ' https://github.com/sebastianbergmann/phpunit.git ' '/var/www/vendor/phpunit/phpunit' && cd '/var/www/vendor/phpunit/phpunit' && git remote add composer ' https://github.com/sebastianbergmann/phpunit.git ' && git fetch composer && git remote set-url origin ' https://github. com/sebastianbergmann/phpunit.git ' && git remote set-url composer ' https://github.com/sebastianbergmann/phpunit.git'" 超过了 300 秒的超时时间。> install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom -installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize -autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] []...错误:服务“contianer_name”无法构建:命令“/bin/sh -c composer install && rm $(which composer)”返回非零代码:1
我们已经看到了同样的情况,并怀疑它要么是自 1.10 以来 Composer 行为的变化,要么是 GitHub 端的速率限制的变化。
看起来它首先尝试 HTTP 下载(实际上 Composer 没有显示确切的 HTTP 错误并没有帮助),然后回退到克隆源。后者工作了一段时间,但也会导致超时,可能是因为 GitHub 也限制了这些。
无论哪种方式,为我们修复它的是确保对 GitHub 的 Composer HTTP 请求进行身份验证。请参阅此处的文档:https : //getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
| 归档时间: |
|
| 查看次数: |
1353 次 |
| 最近记录: |