6

I'm looking for a way, to disable the Git SSL verification globally but for a single remote only.

The only ways I know about, are these two possibilies:

  • Do it globally, for all remotes: git config --global http.sslVerify false
  • Do it locally in every single remotes repo: git config --local http.sslVerify false

But is there a chance to set the config like you can do it with proxy settings? For example:

I have a system wide set proxy config in my ~/.gitconfig. But instead of overriding it by a local proxy setting, I used:

git config --global remote.<remote name>.proxy "" (in this case for a direct connection)

Unfortunately something like the following does not work:

git config --global remote.<remote name>.http.sslVerify false

Any ideas? Thanks and regards!

lumen
  • 219
  • 1
  • 2
  • 10

3 Answers3

8

In case anyone else stumbles upon this, the way to set http.sslVerify for a specific remote from command line would be:

git config --global http.<remote name>.sslVerify false

e.g.

git config --global http.https://gitlab.domain.com/.sslVerify false
scrthq
  • 1,039
  • 11
  • 17
6

In the gitconfig you can specify for each remote address both proxy and sslVeryfy like this:

no proxy and sslVerify false

[http "https://blah.com/"]
    sslVerify = false
    proxy =

and also for all the others proxy and sslVerify false

[http]
    sslVerify = false
    proxy = http://yourproxyaddress.com:8080
gofr1
  • 15,741
  • 11
  • 42
  • 52
1

Please try this. Thanks!

git config --add http.sslVerify false
  • I am using lets encrypt ssl service and this is causing me to get this error: "SSL certificate problem: certificate has expired". I cant remember the issue, but no time to investigate further. – PBo Oct 16 '22 at 15:31