3

I'm trying to get my head around the PHP dependency manager Composer, so that I can install a package from a private GitHub repository.

I've followed the instructions about using private repositories for a test repo, and I'm getting a weird 406 error which is:

The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

The error message is:

$ 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

So it is working insofar as installing from source rather than the zip. My question really is, how on earth do I address the 406 error? Is there something I need to do to modify composer?

Jake Rayson
  • 921
  • 7
  • 20
  • 1
    Sounds like a bug in composer; 406 should mean the client has sent `Accept-*` headers such that the server has unacceptable content. – Wooble Sep 16 '14 at 13:44
  • Possibly related: http://stackoverflow.com/questions/21171142/how-to-install-r-package-from-private-repo-using-devtools-install-github (github may be sending spurious 406 when there's actually an auth problem?) – Wooble Sep 16 '14 at 13:49
  • 2
    definitely not a bug in composer because I'm looking for answers for the same problem using pip in python – Cfreak Sep 25 '14 at 19:57

0 Answers0