Unable to set the sslVerify to false

carol dsouza picture carol dsouza · Jun 4, 2015 · Viewed 91.1k times · Source

Actually I'm trying to install an ngCordova plugin for SQLite. But its giving me the error: Unknown SSL protocol error in connection to github.com:443 while accessing https://github.com/brodysoft/Cordova-SQLitePlugin.git/info/refs fatal: HTTP request failed. On doing some research, I came across the solution to set the sslVerify to false. I am not able to set the command git config http.sslVerify "false" using the command prompt. It is giving me the error: could not lock config file /.gitconfig: No such file or directory. I also tried doing it manually by editing the gitconfig file; but its not happening

Answer

1337joe picture 1337joe · Jun 4, 2015

The error message you mentioned from trying to set a configuration is printed when you try to set a local git configuration when you're not in a git repo. You'll need to either set a global (add --global flag) configuration or cd into an existing git repo to set it to just that repo.

Ideally you want to limit the scope of the sslVerify "false" configuration, but if you're trying to get the initial clone you may need to set it as a global setting (temporarily) using:

git config --global http.sslVerify "false"

With that set you should be able to clone the repo, at which point I'd recommend unsetting it as a global configuration and setting it in your newly-cloned repo:

git config --global --unset http.sslVerify
cd <your newly-cloned repo>
git config http.sslVerify "false"

To verify what your configurations are set to after you're done you can run:

git config --global --list
git config --local --list