Unable to set the sslVerify to false

只愿长相守 提交于 2020-06-09 08:46:09

问题


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


回答1:


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


来源:https://stackoverflow.com/questions/30636018/unable-to-set-the-sslverify-to-false

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!