title: Python setuptools: How can I list a private repository under install_requires?
body: <p>I am creating a <code>setup.py</code> file for a project which depends on private GitHub repositories.  The relevant parts of the file look like this:</p>
  
  <pre><code>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/',
      ],
      ...,
  )
  </code></pre>
  
  <p>I am using <code>setuptools</code> instead of <code>distutils</code> because the latter does not support the <code>install_requires</code> and <code>dependency_links</code> arguments per <a href="https://stackoverflow.com/questions/9810603/adding-install-requires-to-setup-py-when-making-a-python-package">this</a> answer.</p>
  
  <p>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 <code>setuptools</code> authenticate.</p>
  
  <p>Here are some things I've tried:</p>
  
  <ol>
  <li><p>Use <code>git+ssh://</code> instead of <code>https://</code> in <code>dependency_links</code> as I would if installing the repo with <code>pip</code>.  This fails because setuptools doesn't recognize this protocol ("unknown url type: git+ssh"), though the <a href="http://pythonhosted.org/distribute/setuptools.html#dependencies-that-aren-t-in-pypi" rel="noreferrer">distribute documentation</a> says it should.  Ditto <code>git+https</code> and <code>git+http</code>.</p></li>
  <li><p><code>https://&lt;username&gt;:&lt;password&gt;@github.com/...</code> - still get a 404.  (This method doesn't work with <code>curl</code> or <code>wget</code> from the command line either - though <code>curl -u &lt;username&gt; &lt;repo_url&gt; -O &lt;output_file_name&gt;</code> does work.)</p></li>
  <li><p>Upgrading setuptools (0.9.7) and virtualenv (1.10) to the latest versions.  Also tried installing distribute though <a href="https://stackoverflow.com/questions/6344076/differences-between-distribute-distutils-setuptools-and-distutils2">this overview</a> says it was merged back into setuptools.  Either way, no dice.</p></li>
  </ol>
  
  <p>Currently I just have <code>setup.py</code> 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. :)</p>
  
  <p>Duplicate-ish question with no answers <a href="https://stackoverflow.com/questions/12956168/python-how-to-connect-to-a-protected-svn-repository-with-setuptools">here</a>.</p>