I'm trying to pip or pipenv install a Python package I pushed to my organisation's private PyPI repository hosted on JFrog Artifactory.
From the Artifactory documentation http://<username>:<password>@hostname...
should work. I've tried my login password and the one that gets derived from it in the Set Me Up tool within the Artifact Repository Browser.
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.
$ pip search package-name --index https://user:[email protected]/organisation/api/pypi/pypi/simple
User for organisation.jfrog.io:
$ pip install --extra-index-url https://user:[email protected]/organisation/api/pypi/pypi/simple package-name
Looking in indexes: https://pypi.org/simple, https://user:[email protected]/organisation/api/pypi/pypi/simple
Collecting package-name
User for organisation.jfrog.io:
Using curl
to attempt HTTP authentication also does not work.
$ curl -i https://user:[email protected]/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"
} ]
}
It seems this was a temporary problem with Artifactory. When I run all the code in my original question I get success - no asking for username/password, curl
returns results, installing works. Getting in contact with someone in their support team may have helped.