Fixing depth_zero_self_signed_cert in cPanel for Git Operations
12.03.2026
Temporarily Disable SSL Verification (Quick Fix)
If you just need a temporary workaround, disable SSL verification for Git:
For the broader SSL/TLS-error variant and related cPanel topics, see Fixing depth_zero_self_signed_cert in SSL/TLS and cpsrvd — cPanel Service Daemon.
git config --global http.sslVerify false
Warning: This is insecure and should only be used for testing.
To disable SSL verification only for a specific repository, run this inside the repo:
git config --local http.sslVerify false
Test Git again:
git clone https://yourdomain.com/repo.git
Add the Self-Signed Certificate to Git (Permanent Fix)
If you want a secure solution without disabling SSL verification, manually add the self-signed certificate.
Locate Your SSL Certificate in cPanel
- Log into cPanel
- Go to SSL/TLS > Manage SSL Sites
- Find your domain and click View Certificate
- Copy the certificate (from
-----BEGIN CERTIFICATE-----to-----END CERTIFICATE-----)
Save the Certificate on Your Server
- Connect to cPanel via SSH
ssh youruser@yourdomain.com - Create a new CA certificate file
nano ~/my-self-signed-ca.crt - Paste the copied certificate and save the file (Ctrl + X, then Y to save).
Add the Certificate to Git
git config --global http.sslCAInfo ~/my-self-signed-ca.crt
Test Git again:
git clone https://yourdomain.com/repo.git
If it works, your Git now trusts the self-signed SSL certificate!
Add the Certificate to the System's Trusted Store
For Debian/Ubuntu
sudo cp ~/my-self-signed-ca.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
For CentOS/RHEL
sudo cp ~/my-self-signed-ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust
Restart Git and test again.
Summary of Fixes
| Issue | Fix |
|---|---|
| Temporary Git fix | git config --global http.sslVerify false (!Insecure) |
| Permanent Git fix | git config --global http.sslCAInfo ~/my-self-signed-ca.crt |
| Trust system-wide | Add certificate to /usr/local/share/ca-certificates/ and run update-ca-certificates |
Now Git should work correctly on cPanel with your self-signed SSL certificate!


