git config trusted certs sslVerify sslCAInfo
# in order to avoid http.sslVerify false
touch $HOME/.git-trusted-certs.pem
for server in PRIVATE.REPO.LOCAL github.com; do
ex +'/BEGIN CERTIFICATE/,/END CERTIFICATE/p' \
<(echo | openssl s_client -showcerts -connect $server:443) -scq \
>> $HOME/.git-trusted-certs.pem
done
# verify certs signatures and configure git
git config --global http.sslCAInfo $HOME/.git-trusted-certs.pem