Software⏱️ 2 min read📅 2026-06-03

How to Fix: Github: error cloning my private repository

Git error cloning private repository due to certificate verification issues.

Quick Answer: Check if the GitHub repository is set to use HTTPS and ensure that your system's CA bundle is up-to-date.

The error you're encountering when trying to clone your private GitHub repository using the HTTPS URL is likely due to a certificate verification issue. This occurs because the `https://` URL is being treated as an HTTP request, rather than an HTTPS one, which requires a valid SSL/TLS certificate.

🛑 Root Causes of the Error

  • Insufficient or invalid SSL/TLS certificates in your system's trust store.

🚀 How to Resolve This Issue

Method 1: Update Your System's Certificate Store

  1. Step 1: Open your terminal and run the command `sudo apt-get update` (for Ubuntu-based systems) or `brew upgrade` (for macOS with Homebrew).

Method 2: Set Up SSH Keys

  1. Step 1: Create a new SSH key pair using the command `ssh-keygen -t rsa -b 4096`.

🎯 Final Words

By following these steps, you should be able to resolve the certificate verification issue and successfully clone your private GitHub repository.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions