title: How do I pull a Python package from private authenticated Artifactory PyPI repository?
body: <p>I'm trying to <strong>pip</strong> or <strong>pipenv</strong> install a Python package I pushed to my organisation's private PyPI repository hosted on JFrog Artifactory.</p>
  
  <p>From the <a href="https://www.jfrog.com/confluence/display/RTF/PyPI+Repositories" rel="nofollow noreferrer">Artifactory documentation</a> <code>http://&lt;username&gt;:&lt;password&gt;@hostname...</code> should work. I've tried my login password and the one that gets derived from it in the <strong>Set Me Up</strong> tool within the <strong>Artifact Repository Browser</strong>.</p>
  
  <p>The following commands ask for username and password but I don't want to enter them from the command line as these are going to be passed into the CI pipeline with environment variables. If I type the username and password at the prompt then it works OK.</p>
  
  <pre><code>$ pip search package-name --index https://user:password@organisation.jfrog.io/organisation/api/pypi/pypi/simple
  User for organisation.jfrog.io: 
  
  $ pip install --extra-index-url https://user:password@organisation.jfrog.io/organisation/api/pypi/pypi/simple package-name
  Looking in indexes: https://pypi.org/simple, https://user:password@organisation.jfrog.io/organisation/api/pypi/pypi/simple
  Collecting package-name
  User for organisation.jfrog.io: 
  </code></pre>
  
  <p>Using <code>curl</code> to attempt HTTP authentication also does not work.</p>
  
  <pre><code>$ curl -i https://user:password@organisation.jfrog.io/organisation/api/pypi/pypi/simple/
  HTTP/1.1 401 Unauthorized
  Content-Type: application/json;charset=ISO-8859-1
  Date: Thu, 26 Apr 2018 18:03:39 GMT
  Server: Artifactory/5.10.1
  WWW-Authenticate: Basic realm="Artifactory Realm"
  X-Artifactory-Id: aolshared3a-organisation
  X-Node: nginx2a.prod-euw1
  Content-Length: 91
  Cache-Control: proxy-revalidate
  Connection: Keep-Alive
  Set-Cookie: BCSI-CS-a61288137a7d35f7=1; Path=/
  
  {
    "errors" : [ {
      "status" : 401,
      "message" : "Authentication is required"
    } ]
  }
  </code></pre>