I have to use a git server without proper certificates, but I don\'t want to have to do
env GIT_SSL_NO_VERIFY=true git command
every single
You can do as follows
For a single repo
git config http.sslVerify false
For all repo
git config --global http.sslVerify false
This works for me:
git init
git config --global http.sslVerify false
git clone https://myurl/myrepo.git
In particular if you need recursive clone
GIT_SSL_NO_VERIFY=true git clone --recursive https://github.com/xx/xx.git
You can do
git config http.sslVerify "false"
in your specific repo to disable SSL certificate checking for that repo only.
This question keeps coming up and I did not find a satisfying result yet, so here is what worked for me (based on a previous answer https://stackoverflow.com/a/52706362/1806760, which is not working):
My server is https://gitlab.dev
with a self-signed certificate.
First run git config --system --edit
(from an elevated command prompt, change --system
to --global
if you want to do it for just your user), then insert the following snippet after any previous [http]
sections:
[http "https://gitlab.dev"]
sslVerify = false
Then check if you did everything correctly:
> git config --type=bool --get-urlmatch http.sslVerify https://gitlab.dev
false