Skip to content

Instantly share code, notes, and snippets.

@mtrefzer
Created August 16, 2021 10:24
Show Gist options
  • Save mtrefzer/7fa31c590ca2eaa573bd899cf72aac63 to your computer and use it in GitHub Desktop.
Save mtrefzer/7fa31c590ca2eaa573bd899cf72aac63 to your computer and use it in GitHub Desktop.

Howto

Git: client error, server certificate verification failed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment