Git GUI on Windows not working with self-signed SSL certificates - gives errors (fatal: SSL certificate)
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
.
Related videos on Youtube
![yak](https://i.stack.imgur.com/MAazu.jpg?s=256&g=1)
yak
Updated on September 18, 2022Comments
-
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:
I tried to do some workaround:
And checked the path
C:\Users\student\.git
to see what I have in my config file: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 usinggit config sslVerify=false
as admin. However, although I havesslVerify = false
in my config file, I still need to usegit -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 over 8 yearsHave you installed the self-signed certificate on the machine in question?
-
yak over 8 years@Ramhound: Actually, I didn't. How should I do it?
-
Ramhound over 8 yearsInstall 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 over 8 years@Ramhound: Ok, I managed to do it - there is no result, I still can't clone the repository
-
Arjan over 8 yearsPlease 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 over 8 yearsTry 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 over 8 years@harrymc: Aldready did it, please see my edit.
-
harrymc over 8 yearsCould you comment on the answers in this thread ?
-
-
yak over 8 yearsPlease read carefully. I already did
git config --global http.sslVerify false
. The commandgit config --global --list
shows me the list of clonned repos, that's all. -
duenni over 8 yearsNo, 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 over 8 yearsOk, 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 didgit 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 over 8 yearsHow was the repo created? Can you
ssh gituser@serverIP
? What doesgit push --verbose
say? -
duenni over 8 yearsAlso it seems like there is no repository set in your config. Does
.git/config
has the remoteurl
parameter set to your server?