How do I set GIT_SSL_NO_VERIFY for specific repos only?


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 time I do a git operation. But I would also like to leave SSL enabled for other git repositories. Is there a way to make this local to a single repo?


You can do

git config http.sslVerify "false"

in your specific repo to disable SSL certificate checking for that repo only.

This won't work with git clone, since you don't yet have the local git repo to be able to set the flag in yet. Therefore in that case:

git -c http.sslVerify=false clone <path>
cd <directory>
git config http.sslVerify "false"

Git Bash is extremely slow on Windows 7 x64

How to migrate GIT repository from one server to a new one