'SSL certificate problem: self signed certificate in certificate chain

I have upgraded my Inteliij IDEA 2019.2 recently and I am getting below error, if I try to pull from my IDE Git Pull Failed: unable to access 'https://github.xxx.com/app-Hello-USD/DGS.git/': SSL certificate problem: self signed certificate in certificate chain.

Could some one help me what option I have to enable.

Thanks



Solution 1:[1]

git config --global http.sslVerify false

Solution 2:[2]

To expand on the answer of @CrazyCoder.

This usually happens because your Git repository server is hosted inside a private network and uses a locally generated (self signed) TLS certificate. Because this certificate is not from a "trusted" source, most software will complain that the connection is not secure.

So you need to disable SSL verification on Git to clone the repository and immediately enable it again, otherwise Git will not verify certificate signatures for any other repository.

  1. Disable SSL verification on Git globally: git config --global http.sslVerify false
  2. Clone your repository: git clone <your repo>
  3. Enable SSL verification on Git globally: git config --global http.sslVerify true
  4. Change directory into your repo: cd <your repo>
  5. Disable SSL verification only on your repository: git config --local http.sslVerify false

Solution 3:[3]

If you want to add the self-signed cert, export the cert you want as a Base-64 encoded .CER file. Locate your Git cert.pem file (for me it is in C:\Program Files\Git\usr\ssl\cert.pem). Open up your .CER file in a text-editor, and copy/paste the contents at the end of your cert.pem file. Save the file. Then open up your console and type

 git config --global http.sslCAInfo "C:\Program Files\Git\usr\ssl\cert.pem"

Solution 4:[4]

From my chief of IT: this can be fixed by disabling SSL checking in the git config for the affected repositories. This should not require elevated privileges to complete.

git config http.sslVerify "false"

This command did not require use of the --global argument.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CrazyCoder
Solution 2
Solution 3 codeMonkey
Solution 4 brethvoice