msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.3k stars 490 forks source link

SSL certificate problem - can't get local issuer certificate #2576

Open tahzabbani opened 3 years ago

tahzabbani commented 3 years ago

Describe the issue

After downloading MSYS2 I try to run the initial pacman -Syu and pacman -Su commands each file fails due to the SSL certificate problem.

The output of pacman -Su is as shown:

:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (14) dash-0.5.11.4-1  gnupg-2.2.28-3  libedit-20210522_3.1-1
              libgnutls-3.7.2-1  libgpgme-1.16.0-1  libhogweed-3.7.3-1
              libksba-1.6.0-1  libnettle-3.7.3-1  libpcre-8.45-1
              libpcre2_8-10.37-1  libsqlite-3.36.0-1  nano-5.8-1
              nettle-3.7.3-1  pacman-contrib-1.4.0-2

Total Download Size:    9.82 MiB
Total Installed Size:  28.07 MiB
Net Upgrade Size:       0.37 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 libpcre-8.45-1-x86_64.pkg.tar.zst failed to download
 dash-0.5.11.4-1-x86_64.pkg.tar.zst failed to download
 libhogweed-3.7.3-1-x86_64.pkg.tar.zst failed to download
 libnettle-3.7.3-1-x86_64.pkg.tar.zst failed to download
 libgnutls-3.7.2-1-x86_64.pkg.tar.zst failed to download
 Total ( 5/14)           9.8 MiB   312 KiB/s 00:32 [#####################] 100%
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.msys2.org, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from repo.msys2.org, skipping for the remainder of this transaction
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from repo.msys2.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.yandex.ru, skipping for the remainder of this transaction
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.yandex.ru : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from download.nus.edu.sg, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from download.nus.edu.sg : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.acc.umu.se, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from ftp.acc.umu.se : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.nluug.nl, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from ftp.nluug.nl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.osuosl.org, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from ftp.osuosl.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.clarkson.edu, skipping for the remainder of this transaction
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.clarkson.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.selfnet.de, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.selfnet.de : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.ufro.cl, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.ufro.cl : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.dotsrc.org, skipping for the remainder of this transaction
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.dotsrc.org : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.tuna.tsinghua.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.tuna.tsinghua.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.ustc.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.ustc.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from sourceforge.net, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from sourceforge.net : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from fastmirror.pp.ua, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from fastmirror.pp.ua : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from ftp.cc.uoc.gr, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from ftp.cc.uoc.gr : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirror.jmu.edu, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirror.jmu.edu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.piconets.webwerks.in, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.piconets.webwerks.in : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from quantum-mirror.hu, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from quantum-mirror.hu : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from www2.futureware.at, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from www2.futureware.at : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from mirrors.sjtug.sjtu.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.sjtug.sjtu.edu.cn : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from mirrors.bit.edu.cn : Operation timed out after 10008 milliseconds with 0 out of 0 bytes received
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from mirrors.bit.edu.cn : Operation timed out after 10007 milliseconds with 0 out of 0 bytes received
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from mirrors.bit.edu.cn : Operation timed out after 10006 milliseconds with 0 out of 0 bytes received
warning: too many errors from mirrors.bit.edu.cn, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.bit.edu.cn : Operation timed out after 10006 milliseconds with 0 out of 0 bytes received
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from mirrors.bit.edu.cn : Operation timed out after 10005 milliseconds with 0 out of 0 bytes received
error: failed retrieving file 'libgnutls-3.7.2-1-x86_64.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libpcre-8.45-1-x86_64.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'dash-0.5.11.4-1-x86_64.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: unable to get local issuer certificate
warning: too many errors from repo.casualgamer.ca, skipping for the remainder of this transaction
error: failed retrieving file 'libhogweed-3.7.3-1-x86_64.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: unable to get local issuer certificate
error: failed retrieving file 'libnettle-3.7.3-1-x86_64.pkg.tar.zst' from repo.casualgamer.ca : SSL certificate problem: unable to get local issuer certificate
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

I have tried to use the command pacman -S ca-certificates but it also failed for the same problems. Is it possible to ignore the SSL verification?

commanderzyl commented 3 years ago

hi, i got the same problem, so i tried the below step, maybe you don't need the 1st step

  1. add the proxy
    export http_proxy=<proxyip>:<port>
    export https_proxy=<proxyip>:<port>
  2. \msys64\etc\pacman.d, edit all the below mirrorlist.*, add your favorite mirror like the fastest in your country, and add it in the first row, also remember changing the "https" to "http", like below:
    
    # See https://www.msys2.org/dev/mirrors

Server = http://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/clang32/ Server = http://mirrors.ustc.edu.cn/msys2/mingw/clang32/


for above 2 steps, i can download all the packages in my companry, hoping can help you
ernstki commented 7 months ago

Try https://www.msys2.org/docs/faq/#how-can-i-make-msys2pacman-trust-my-companys-custom-tls-ca-certificate

I'm still unconvinced if this was my problem—since a direct inspection of the certificate chain with openssl s_client didn't show any of my company's man-in-the-middle certs—but this workaround does seem to have worked for me.