Error "406 Invalid" when trying to use Composer to set up a private repo

I am trying to set up PHP Composer dependency manager so that I can install a package from a private GitHub repository.

I followed the instructions using private repos for the test repo and I get a weird 406 error which is:

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

Error message:

$ 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

      

This way it works with installation from source and not from zip. My question is actually how can I refer to the 406 error? Is there something I need to do to change the composer?

+3


source to share





All Articles