Thanks to fabianlee.org
Git: client error, server certificate verification failed
# Fetch certificate
openssl s_client -showcerts -servername git.mycompany.com -connect git.mycompany.com:443 </dev/null 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p' > git-mycompany-com.pem
# Add certificate to local certificate list
cat git-mycompany-com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt