Unable to download from Python repository hosted in Artifactory
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Mac OS X 10.14.6 , Mojave
- Poetry version: 1.0.5
- Link of a Gist with the contents of your pyproject.toml file: pyproject.toml
Issue
The legacy repositories have versions found in child pages
PYPI Repository:
Please take a look at the Flask package in PyPI repository https://pypi.org/simple/flask/
Package page contains href elements that point to .whl, tar.gz etc.
<a href="https://files.pythonhosted.org/packages/d8/94/7350820/Flask-1.0.4-py2.py3-none-any.whl#sha256=1a21ccc" data-requires-python=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*">Flask-1.0.4-py2.py3-none-any.whl</a>
Artifactory (Legacy) Repository
However the artifactory doesn’t follow the same convention as the PYPI repository. https://artifactory.repo.com/artifactory/my-repo/py-pkg
The package page simply have links to the child pages. The actual binaries are only found in the child pages.
Versions are provided by following pages
https://artifactory.repo.com/artifactory/my-repo/py-pkg/0.1.0 https://artifactory.repo.com/artifactory/my-repo/py-pkg/0.2.0
For legacy repositories, child pages must be read
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (4 by maintainers)
@mikeymop we’re not hardcoding the values, we’re using environment variables to set the auth
Hello @danieleades sorry to necro post, but I have been hitting many dead ends with poetry + artifactory. I was wondering if you can expand a bit on what worked for you with poetry + artifactory.
Just recently I managed to get to work by hardcoding my http basic auth url into my
pyproject.toml
eg:
I noticed that using
poetry config http-basic.artifactory
like with the docs results in 404 errors when requesting a package. Are you hardcoding your basic auth into the source url? Curious because this would complicate ci.EDIT:
It turns out my problem was that I didn’t realize the env var name depends on the
name
under the poetry source. So in this caseHTTP_BASIC_ARTIFACTORY_USERNAME
andHTTP_BASIC_ARTIFACTORY_PASSWORD
were the correct env vars I needed to set.This allowed me to remove the http basic auth from the repo url eg: