git - Clone a Repository with self-signed Certificates

I have tried to recently clone a repository at work and git was complaining because the repository was using a self-signed certificate.

user@server MINGW64 /c/Users/user/Documents/c#
$ git clone http://git.company.com/project.git
Cloning into 'project'...
fatal: unable to access 'http://git.company.com/project.git/': SSL certificate problem: unable to get local issuer certificate

The solution was to temporaly disable the SSL checks in git with the command:

user@server MINGW64 /c/Users/user/Documents/c#
$ git config --global http.sslVerify false

We can now clone the repository :

user@server MINGW64 /c/Users/user/Documents/c#
$ git clone http://git.company.com/project.git
Cloning into 'project'...
warning: redirecting to https://git.company.com/project.git/
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% (69/69), done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 69 (delta 21), reused 0 (delta 0)
Unpacking objects: 100% (69/69), 45.88 KiB | 71.00 KiB/s, done.

And it is important to turn back on SSL check :

user@server MINGW64 /c/Users/user/Documents/c#
$ git config --global http.sslVerify true