Issue #59 open
ke zhu
created an issue

I need to make one official Pypi mirror inside of my company, but there has proxy.

I have set up HTTP_PROXY and HTTPS_PROXY and call bandersnatch to make the mirror.

It failed by connection time out.

The wget can work.

How to solve this? I used version is 1.8

Comments (17)

  1. fokas

    works for me through proxy, but I had to set https_proxy environment variable, not only http_proxy.

    compuguy, you might give that a try, I'm using bandersnatch 1.11

  2. Paul Kempf

    Had to apply Pronix NA's solution manually to xmrcp2 (as the change isn't implemented in the latest version).

    I exported my http_proxy variable as follow :

    export http_proxy=http://user:password@proxy:port
    export https_proxy=http://user:password@proxy:port
    

    Running bandersnatch works just fine now.

    Bandersnatch 1.11

  3. Christian Theune

    Quick update on this as it's been around for ages. As we moved to Python 3 my current plan is to also move to asyncio to get rid of the threading code. I'll add add/check/document proxy handling support after we switched to aiohttp in the same move.

  4. cooperlees

    FYI - I also use the current 2.0.0 through proxies using the two ENV VARs used above.

    import os
    
    #if conf has proxies section add via:
    os.environ['http_proxy'] = http://user:password@proxy:port
    os.environ['https_proxy'] = https://user:password@proxy:port
    

    I do wrap bandersnatch tho and import it's mirror syncing Object. Adding this to main bandersnatch wouldn't be to hard.

  5. Log in to comment