GIT SSL certificate problem: unable to get local issuer certificate

Solution 1 (worst): disable certificate in GTI configuration

 git config --global http.sslCAinfo /bin/curl-ca-bundle.crt

Solution 2: if this problem is occuring because git cannot complete the https handshake with the git server were the repository you are trying to access is present.

Steps to get the certificate from the github server

  1. Open the github you are trying to access in the browser
  2. Press on the lock icon in the address bar > click on ‘certicicate’
  3. Go to ‘Certification Path’ tab > select the top most node in the heirarchy of certifcates > click on ‘view certificate’
  4. Now click on ‘Details’ and click on ‘Copy to File..’ > Click ‘Next’ > Select ‘Base 64 encoded X509 (.CER)’ > save it to any of your desired path.

Steps to add the certificate to local git certificate store

  1. Now open the certicate you saved in the notepad and copy the content along with –Begin Certificate– and –end certificate–
  2. To find the path were all the certificates are stored for your git, execute the following command in cmd.git config –list
  3. Check for the key ‘http.sslcainfo’, the correspondig value will be path.
  4. Now open ‘ca-bundle.crt’ present in that path.

Note 1 : open this file administrator mode otherwise you will not be able to save it after update. (Tip – you can use Notepad++ for this purpose)

Note 2 : Before modifying this file please keep a backup elsewhere.

  1. Now copy the contents of file mentioned in step 1 to the file in step 4 at end file, like how other certificates are placed in ca-bundle.crt.
  2. Now open a new terminal and now you should be able to perform opertions related to the git server using https.

To know where gitconfig file is:

git config --list --show-origin