Home:ALL Converter>twine upload fails when using a proxy server

twine upload fails when using a proxy server

Ask Time:2019-03-16T00:28:31         Author:Wollmich

Json Formatter

I can't upload to pypi using twine when a proxy server is involved.

That's what I tried so far:

python -m twine upload -u USER -p PASSWORD dist/*

When I'm behind our company proxy server twine just hangs, no error message. Set the https_proxy and thehttp_proxy environment variables doesn't help as well.

Our company proxy server has it's own CA certificate (I've the .cer file).

So how can I use twine behind a proxy server.

With pip I was able to do it by adding the following pip.ini file to %Appdata%\pip:

[global]
proxy = proxy.company.com:8080
cert = C:\CA_Proxy.cer

Author:Wollmich,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55186914/twine-upload-fails-when-using-a-proxy-server
jpeg :

I've been able to solve a similar issue under Windows by setting an HTTPS_PROXY environment variable, without having to set anything about certificates.\n\nWorking in a cmd prompt, run\n\nset HTTPS_PROXY=proxy.company.com:8080\n\n\nbefore running your twine command in the same session.\n\nThe environment variable can also be set permanently using the control panel or as described in https://superuser.com/q/79612/1148425 ",
2020-03-10T16:28:02
yy