Git GUI on Windows not working with self-signed SSL certificates - gives errors (fatal: SSL certificate)

8,237

Please post the output of $ git config --global --list. The command for disabling SSL checks would be git config --global http.sslVerify false.

Get the certificate as a .pem file and set git to trust it $ git config --global http.sslCAInfo /path/to/cert.pem.

Share:
8,237

Related videos on Youtube

yak
Author by

yak

Updated on September 18, 2022

Comments

  • yak
    yak almost 2 years

    I'm using git GUI on Windows 7. I need to clone the repository and simply want to just use it.

    However, when cloning, pulling, pushing to/from repo with self-signed certificate, I'm getting this error:

    enter image description here enter image description here

    I tried to do some workaround:

    enter image description here

    And checked the path C:\Users\student\.git to see what I have in my config file:

    enter image description here

    However, I still can't get this work. Does anyone have any clue? How to work with git gui and self-signed certificates?


    Summing up:

    I have a server where I installed a Git server. I secured the server with self-signed certificate. I created a repository, lets call it X. Now I have problems with clonning/pushing/pulling any repository on my Git server, when using the git gui.

    However, when I switched to git cmd, clonning/pushing was ok, when I used those commands:

    git -c http.sslVerify=false push
    git -c http.sslVerify=false clone https://...
    

    I tried to edit my configuration file located in C:\Users\student\.git by using git config sslVerify=false as admin. However, although I have sslVerify = false in my config file, I still need to use git -c http.sslVerify=false when using git cmd (but let's say, I'm ok with that).

    So basically, I need a way to skip the SSL certificate checking when using git gui (its totally secure, I'm using it only on my local network). The question is how to do it with git gui? Is there any option that will set once and for all, that I want to skip the certificate verification part working with git gui?

    • Ramhound
      Ramhound over 8 years
      Have you installed the self-signed certificate on the machine in question?
    • yak
      yak over 8 years
      @Ramhound: Actually, I didn't. How should I do it?
    • Ramhound
      Ramhound over 8 years
      Install the certificate like you would any other SSL certificate in Windows. I have an answer that goes into depth how to add a certificate to the certificate store I find repeating answers not to be enjoyable.
    • yak
      yak over 8 years
      @Ramhound: Ok, I managed to do it - there is no result, I still can't clone the repository
    • Arjan
      Arjan over 8 years
      Please use text rather than screenshots, so search works for future visitors, and add some details to your title to get some views. Also please add what you've done (according to your comments) to your question. Thanks & success.
    • harrymc
      harrymc over 8 years
      Try to run git GUI from the command prompt rather than from the Windows start menu. Try also to set 'Standard (Fast, Semi-Redundant, Hardlinks)' cloning.
    • yak
      yak over 8 years
      @harrymc: Aldready did it, please see my edit.
    • harrymc
      harrymc over 8 years
      Could you comment on the answers in this thread ?
  • yak
    yak over 8 years
    Please read carefully. I already did git config --global http.sslVerify false. The command git config --global --list shows me the list of clonned repos, that's all.
  • duenni
    duenni over 8 years
    No, you did it without the --global option. git config --global --list should give you a list of all set global config options. If it shows you cloned repos (WTF?) something is wrong with your git install.
  • yak
    yak over 8 years
    Ok, I'm sorry - you are right. The result is: s11.postimg.org/4wrjfko9f/test.png. Now I don't have the message about SSL erros, but a new error came out: fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.. Since it's my own repository on my own server, I do have rights. What might be wrong now? I did git config --global http.postBuffer 524288000 as well, with no effect. Im using the url with my name, for instance: https://[email protected]/repo.git.
  • duenni
    duenni over 8 years
    How was the repo created? Can you ssh gituser@serverIP? What does git push --verbose say?
  • duenni
    duenni over 8 years
    Also it seems like there is no repository set in your config. Does .git/config has the remote url parameter set to your server?