3

我试图了解 PHP 依赖管理器Composer,以便我可以从私有 GitHub 存储库安装包。

我已按照有关使用私有存储库进行测试存储库的说明进行操作,但我收到了一个奇怪的406 错误,即:

请求的资源只能生成根据请求中发送的 Accept 标头不可接受的内容。

错误信息是:

$ composer install -n
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing growdigital/access (0.0.3)
    Downloading: connection...Failed to download growdigital/access from dist: The "https://github.com/growdigital/access/archive/0.0.3.zip" file could not be downloaded (HTTP/1.1 406 Not Acceptable)
Now trying to download from source
  - Installing growdigital/access (0.0.3)
Cloning 464c3a3a580ded3fdaf43a246388b6de33fbac89

因此,它可以从源代码而不是 zip 安装。我的问题真的是,我到底该如何解决 406 错误?我需要做些什么来修改作曲家吗?

4

0 回答 0