无法将sslVerify设置为false [英] Unable to set the sslVerify to false
问题描述
实际上,我正在尝试为SQLite安装ngCordova插件.但是它给了我错误:访问
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
推荐答案
当您不在git repo中时尝试设置本地git配置时,将显示您尝试设置配置时提到的错误消息.您需要设置全局(添加--global
标志)配置,或将cd设置到现有的git存储库中,以将其设置为该存储库.
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.
理想情况下,您想限制sslVerify "false"
配置的范围,但是如果您尝试获取初始克隆,则可能需要使用以下命令(临时)将其设置为全局设置:
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
这篇关于无法将sslVerify设置为false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!