title: Pip install wheel from private github repo
body: <p>We have a private repo containing a Python project that is being built by setuptools on a CI/CD server and then the wheel artifact is being pushed back to Github as a release. This process works great, however getting the resulting wheel back into other build processes that require this as a dependancy does not seem so easy.</p>
  
  <p>Our original process was using git submodules, however the wheel format is much better self contained, and the consuming project does not have to worry about relative paths, because the wheel is installed straight into site-packages.</p>
  
  <p>The biggest issue has come with pulling and installing the wheel in any consuming projects. Adding the url of the wheel to the <code>requirements.txt</code> gets pip to try to pull the wheel, but it then fails with the following:</p>
  
  <pre><code>Could not install requirement &lt;ProjectName&gt;==2.0 from
  https://github.com/&lt;CompanyName&gt;/&lt;ProjectName&gt;/releases/download/v2.0.0/&lt;ProjectName&gt;-2.0-py3-none-any.whl (from -r 
  requirements.txt (line 27)) because of HTTP error 404 Client Error: Not Found for url 
  </code></pre>
  
  <p>A 404 error is also returned if following the url in a private browser window. If the url is followed on a browser already logged in to GitHub, the wheel is returned. Inspecting the request that got the wheel shows that the browser sent a cookie that let GitHub know that this wheel belonged to me, but sending cookies programatically doesn't seem like a great idea.</p>
  
  <p>The following questions both touch on the same topic. The accepted answer for the first question seems not very elegent - hopefully there is a better method somewhere!</p>
  
  <p><a href="https://stackoverflow.com/questions/25923939/how-do-i-download-binary-files-of-a-github-release">How do I download binary files of a GitHub release?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/51181840/pip-install-wheel-version-from-private-github-repo">pip install wheel version from private github repo</a></p>
  
  <p>Thanks</p>
  
  <p>Stuart</p>