Skip to main content

Fix Git SSL certificate issue

 

How to fix  SSL certificate problem: self-signed certificate in certificate chain

For Windows (11) Client

Try out:

1. Update the git config to disable ssl certificate ask

  • Go to .gitconfig and update it or run the following command in the GIT client:
2. Install certificate with below command 
    
 As of v2.5.0 of Git for Windows, the installed certificate file has moved to C:\Program Files (x86)\Git\mingw32\ssl\certs\ca-bundle.crt. You have to add your certs into this file.

3. Step 1: Import  the certificate into the window trust store
  • Enter Start | Run | MMC.



  • Click File | Add/Remove Snap-in.



  • In the Add or Remove Snap-ins window, select Certificates and click Add.


  • In Add or Remove Snap-ins window, click OK
  • In the MMC main console, click on the (>) symbol to expand the Certificate snap-in.
  • To import the CA certificate, navigate to Trusted Root Certification Authorities | Certificates pane.

 

  • Right-click within the Certificates panel and click All Tasks | Import to start the Certificate Import wizard.


 

Step 2: Configure git to use the certificate in the Windows Trust store

When using Windows, the problem resides that git by default uses the "Linux" crypto backend. Starting with Git for Windows 2.14, you can configure Git to use SChannel, the built-in Windows networking layer as the crypto backend. To do that, just run the following command in the GIT client:

                git config --global http.sslbackend schannel

This means that it will use the Windows certificate storage mechanism and you don't need to explicitly configure the curl CA storage (http.sslCAInfo) mechanism. Once you have updated the git config, Git will use the Certificate in the Windows certificate store and should not require http.sslCAInfo setting.

Comments

Popular posts from this blog

API Basics

 

Algorithm solving Common Patterns & Techniques

  These are targeted data manipulation strategies used to handle arrays, strings, and linked lists efficiently. Two Pointers : Uses two reference pointers to iterate through a data structure simultaneously, typically from opposite ends or at different speeds (Fast & Slow pointers). Sliding Window : Maintains a subset of data (a "window") over a sequential structure to track running statistics without recalculating the whole set. Prefix Sum : Pre-computes and stores cumulative sums of an array to allow for \(O(1)\) constant-time range sum queries. Dynamic Programming (DP ): Dynamic programming is an optimization technique used to solve problems by breaking them down into simpler subproblems and storing the results of these subproblems to avoid redundant computations. It is particularly effective for problems exhibiting overlapping subproblems and optimal substructure. Greedy Algorithm Breadth-First Search (BFS) / Depth-First Search (DFS) : Systematic graph and tree travers...