The file /etc/pki/tls/certs/ca-bundle.crt is empty

徐持恒 Xu Chiheng via Cygwin <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <CAPOVtOu6NVYeXrtX0D9NdarGZcUu-xP=3Ykb7WztpG-Be44Hkw@mail.gmail.com>
# file /etc/pki/tls/certs/ca-bundle.crt
/etc/pki/tls/certs/ca-bundle.crt: symbolic link to
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

# git clone https://gitlab.com/qemu-project/qemu.git
Cloning into 'qemu'...
fatal: unable to access 'https://gitlab.com/qemu-project/qemu.git/':
error adding trust anchors from file: /etc/pki/tls/certs/ca-bundle.crt

This will cause curl and git not be able to download https urls, and
will let git build fail to produce a usable git.

# git clone https://gitlab.com/qemu-project/qemu.git
Cloning into 'qemu'...
warning: templates not found in
/cygdrive/e/Note/Tool/git-cygwin-clang-bfd-release-install/share/git-core/templates
git: 'remote-https' is not a git command. See 'git --help'.
fatal: remote helper 'https' aborted session

Temporary fix(link to a previous working tls-ca-bundle.pem) :
https://github.com/xu-chiheng/Note/blob/main/.bashrc.d/quirk.sh#L125
fix_cygwin_tls_certs() {
    local source=/etc/pki/tls/certs/ca-bundle.crt
    local target=~/Util/tls-ca-bundle.pem
    if ! { [ -e "${source}" ] && [ "$(readlink -f "${source}")" =
"$(readlink -f "${target}")" ] ;}; then
        rm -rf "${source}" \
        && ln -s "${target}" "${source}"
    fi
}

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.