git ssl without env GIT_SSL_NO_VERIFY=true

33,768

Solution 1

You could do this (from the git-config manual page):

git config --global http.sslVerify false

But what's the point of having it on an https server if the certificate won't properly validate?

Solution 2

If the https server uses a self-signed certificate, save it to your local machine's hard disk (in .crt format), and add this to .git/config for the relevant working copy

[http]
        sslCAInfo=/path/to/your-server-certificate.crt

That will make it always expect that certificate when connecting to the https server in question, and not otherwise.

Share:
33,768
RaKoDev
Author by

RaKoDev

php, symfony, doctrine, mysql

Updated on December 23, 2020

Comments

  • RaKoDev
    RaKoDev over 3 years

    İ install my own git server in distant machine with ssl.

    whene i use this command:

    env GIT_SSL_NO_VERIFY=true git clone https://xxx.xxx.xxx.xxx/git/project.git

    all is fine, and with env GIT_SSL_NO_VERIFY=true all git command work fine.

    but i need pull and push with netbeans ide, so with netbeans ide i connot add this

    env GIT_SSL_NO_VERIFY=true

    so netbeans say:

    Cannot connect to the remote repository at https://xxx.xxx.xxx.xxx/git/project.git

    What i need to do?