Software⏱️ 3 min readπŸ“… 2026-06-11

How to Fix: macOS - Getting SSL certificate error on valid certificate when accessing via git

Git error on macOS Catalina due to expired SSL certificate

Quick Answer: Update git using homebrew or reinstall with a newer version.

A recent issue has been reported by users on macOS Catalina 10.15.5, where accessing Git repositories via HTTPs results in an SSL certificate error despite having a valid certificate. This affects users who rely on Git for version control and collaboration.

The frustration with this issue lies in the fact that it is not limited to just macOS or Git, but also affects Windows 10 users using the same Git version through homebrew. It's essential to note that Safari and other browsers on both macOS and iOS do not report any errors, indicating a possible discrepancy between different applications or versions of HTTPs.

πŸ›‘ Root Causes of the Error

  • The primary reason for this issue is due to the way cURL handles SSL certificates in macOS Catalina. According to Apple's documentation, macOS 10.15.5 has a known issue with cURL where it incorrectly verifies SSL certificates. This can lead to errors when accessing HTTPS repositories using Git.
  • An alternative possible cause could be the specific version of homebrew being used, as some versions may have outdated or incompatible dependencies that affect SSL certificate verification.

πŸš€ How to Resolve This Issue

Update cURL and its dependencies

  1. Step 1: Open a terminal on your macOS machine and run the command `brew upgrade curl` to ensure you have the latest version of cURL. This will update any outdated dependencies and resolve potential issues with SSL certificate verification.
  2. Step 2: After upgrading cURL, try running `git config --get https://github.com` to verify that Git is using the correct HTTPS URL. If the issue persists, proceed to the next step.
  3. Step 3: To further troubleshoot, you can try updating your system's OpenSSL library by running `brew install openssl` and then restarting your terminal or re-running any affected commands.

Disable SSL certificate verification for Git

  1. Step 1: Run the command `git config --global https://github.com true` to disable SSL certificate verification for Git. This will allow Git to continue accessing HTTPS repositories even if the certificate is not fully trusted.
  2. Step 2: Note that disabling SSL certificate verification can make your system more vulnerable to man-in-the-middle attacks, so use this method with caution and only when necessary.

✨ Wrapping Up

To resolve the issue of getting an SSL certificate error on valid certificates when accessing Git repositories via HTTPs on macOS Catalina 10.15.5, try updating cURL and its dependencies or disabling SSL certificate verification for Git. If you encounter any issues during these steps, please refer to Apple's documentation or seek further assistance from a system administrator.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions