I am creating a setup.py file for a project which depends on private GitHub repositories.  The relevant parts of the file look like this:
from setuptools import setup
setup(name='my_project',
    ...,
    install_requires=[
        'public_package',
        'other_public_package',
        'private_repo_1',
        'private_repo_2',
    ],
    dependency_links=[
        'https://github.com/my_account/private_repo_1/master/tarball/',
        'https://github.com/my_account/private_repo_2/master/tarball/',
    ],
    ...,
)
I am using setuptools instead of distutils because the latter does not support the install_requires and dependency_links arguments per this answer.
The above setup file fails to access the private repos with a 404 error - which is to be expected since GitHub returns a 404 to unauthorized requests for a private repository.  However, I can't figure out how to make setuptools authenticate.
Here are some things I've tried:
- Use - git+ssh://instead of- https://in- dependency_linksas I would if installing the repo with- pip. This fails because setuptools doesn't recognize this protocol ("unknown url type: git+ssh"), though the distribute documentation says it should. Ditto- git+httpsand- git+http.
- https://<username>:<password>@github.com/...- still get a 404. (This method doesn't work with- curlor- wgetfrom the command line either - though- curl -u <username> <repo_url> -O <output_file_name>does work.)
- Upgrading setuptools (0.9.7) and virtualenv (1.10) to the latest versions. Also tried installing distribute though this overview says it was merged back into setuptools. Either way, no dice. 
Currently I just have setup.py print out a warning that the private repos must be downloaded separately.  This is obviously less than ideal.  I feel like there's something obvious that I'm missing, but can't think what it might be. :)
Duplicate-ish question with no answers here.
 
     
     
     
     
     
     
     
     
     
     
     
    