composer/composer — pull request #1385 by cs278 (2012-12-03 16:35:57+00:00)
Title: GitHub private dist downloads

I just tried to use our internal Composer repository to install a package from distribution packages and it failed, I'm not sure if it ever worked I guess it must have done. GitHub is returning a 406 (weirdly) for requests to a private repository archive, and using oauth doesn't work.

I've changed the GitHub driver to use the private dist URLs GH document [here](http://developer.github.com/v3/repos/contents/#get-archive-link) and adjusted the file downloaded to handle `api.github.com` as a GitHub domain.

To get around the problem of duplicate OAuth tokens I've extended the GitHub oauth code to silently copy credentials for `github.com` to `api.github.com`.