bandersnatch
bandersnatch copied to clipboard
how to change master in conf to another mirror site
how to change master to another mirror site
tht default conf is master = https://pypi.org in /etc/bandersnatch.conf
It will download all things index,metadata,package from pypi.org but in my case,it download slowly. I try to change it to another mirror site,it does not work.
Here is a mirror list I try:
master = https://pypi.org
#master = https://pypi.tuna.tsinghua.edu.cn/simple/
#master = https://pypi.tuna.tsinghua.edu.cn
#master = https://mirrors.aliyun.com
#master = https://pypi.doubanio.com/
the logs is shown bellows partly
raise ClientConnectorSSLError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host pypi.tuna.tsinghua.edu.cn:443 ssl:default [[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)]
port status
nc -vz pypi.tuna.tsinghua.edu.cn 443
Connection to pypi.tuna.tsinghua.edu.cn 443 port [tcp/https] succeeded!
I try:
pip install --upgrade certifi
It does not work I think the mirror site does not support xmlrpg . So is there a way to download index and metadata from pypi.org,and download packages from mirror site like https://pypi.tuna.tsinghua.edu.cn/simple/ ?
my goal is to download packages from mirror site and download fast.
We do support this. Just need to document it better!
- Would love a PR adding this to the docs!
download-mirror = https://pypi-mirror.example.com/
download-mirror-no-fallback = False
- fallback allows if the mirror does not have package release of the package, bandersnatch will try master URL.
Example: https://github.com/pypa/bandersnatch/blob/main/src/bandersnatch/default.conf#L90-L102