For private repositories, Github sends a 302 redirect for curl connections.
However, pip install receive a 406 error. I open a ticket in Github to investigate this, but I also would like to debug the pip request.
Downloading/unpacking private_repo from https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz
HTTP error 406 while getting https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz
Could not install requirement private_repo from https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz because of error HTTP Error 406: Not Acceptable
Cleaning up...
Removing temporary dir /Users/user/workspaces/python/envs/webpy/build...
Could not install requirement private_repo from https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz because of HTTP error HTTP Error 406: Not Acceptable for URL https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz
Exception information:
Traceback (most recent call last):
File "/Users/user/workspaces/python/envs/webpy/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
status = self.run(options, args)
File "/Users/user/workspaces/python/envs/webpy/lib/python2.7/site-packages/pip/commands/install.py", line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/user/workspaces/python/envs/webpy/lib/python2.7/site-packages/pip/req.py", line 1099, in prepare_files
% (req_to_install, e, url))
InstallationError: Could not install requirement private_repo from https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz because of HTTP error HTTP Error 406: Not Acceptable for URL https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz
Storing complete log in /Users/user/.pip/pip.log
Closing this as I don't believe this to be a pip bug, if you're still getting this I would try to reproduce it with requests directly, and if you can raise the issue with them.
For private repositories, Github sends a 302 redirect for curl connections. However, pip install receive a 406 error. I open a ticket in Github to investigate this, but I also would like to debug the pip request.
$ pip install -v https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz#egg=private_repo
$ curl -v https://ACCESS_TOKEN:x-oauth-basic@github.com/user/private_repo/archive/v0.1.0.tar.gz#egg=private_repo