https://github.com/dsp-testing/poetry-407
https://github.com/dsp-testing/poetry-407
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dsp-testing/poetry-407
- Owner: dsp-testing
- Created: 2022-09-09T16:35:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T12:00:35.000Z (almost 3 years ago)
- Last Synced: 2023-03-03T21:09:44.637Z (almost 3 years ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poetry HTTP 407 Bug
This recreates a bug in Poetry where it fails to authenticate with a proxy that requires authentication.
## Steps to reproduce
Requires Docker since there's a bit of setup involved.
1. Run `docker run -it --rm $(docker build -q .)`
2. Inside the container, run `./script.sh`
3. There will be a 407 error
While still in the container, try `curl https://example.com`, it works.
### Explanation
The script runs `mitmproxy` which is [configured to require authentication](mitm-config.yaml). Poetry is configured to use the proxy via environment variables in the Dockerfile.
The problem correlates with the git source in `pyproject.toml`. Remove it and the problem is gone.
> **Note** This is somewhat mitigated by https://github.com/python-poetry/poetry/pull/6131. Most people will pin to a revision or tag and not see this issue after Poetry's next release.