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

我已经按照using private repositories的说明进行了test repo,我得到了一个奇怪的406 error,它是:

请求的资源只能根据请求中发送的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错误?我需要做些什么才能修改作曲家?