-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twine doesn't fail when server return HTTP code 403 on upload #856
Comments
From looking at the relevant source, I'd be surprised the HTTP response is actually a 403. It seems pretty clear that Twine will generate an error if it receives an HTTP response that indicates an error: Lines 198 to 210 in ce87465
I wonder if there's something in your WAF config that's mutating the response. I do think Twine could be more helpful, e.g. by always showing the HTTP response when |
It's definitely not returning a 403 as Brian already pointed out. There must be something between your WAF and twine that's causing that - perhaps a proxy. That proxy might be mutating the response, but anything that's a 400 or higher would cause us to display an error and halt execution as Brian pointed out. |
Closing as an environment-related issue, per #859 (comment) |
Your Environment
Thank you for taking the time to report an issue.
To more efficiently resolve this issue, we'd like to know some basic information about your system and setup.
Your operating system:
Manjaro 21.1.6 Pahvo
Version of python you are running:
Python 3.9.7
How did you install twine? Did you use your operating system's package manager or pip or something else?
I use pip
Version of twine you have installed (include complete output of):
Twine 3.7.1
Which package repository are you targeting?
enterprise repository based on Jfrog Artifactory behind a WAF.
If you're having issues uploading a specific package, you must include a copy of the following:
PKG-INFO
file.pypirc
file (REMOVE ALL USERNAMES & PASSWORDS BEFORE UPLOADING)PKG-INFO
no .pypirc file
The Issue
Please describe the issue that you are experiencing.
When we are on internet, our WAF blocks all binaries upload and return a HTTP code 403.
log :
The binaries are not uploaded to Artifactory but Twine does not fail.
Even with verbose option, we can't see any problem.
Steps to Reproduce
Difficult to reproduce because it's specific to our environment.
I don't know how to fail a download because it has a code HTTP 403
Is there a solution to make twine failed if the upload fail? Or display the HTTP response to see the 403 code?
The text was updated successfully, but these errors were encountered: