使用Git,有没有办法告诉它接受自签名证书?
我使用https服务器来托管git服务器但是现在证书是自签名的.
当我第一次尝试在那里创建回购时:
git push origin master -f
Run Code Online (Sandbox Code Playgroud)
我收到错误:
error: Cannot access URL
https://the server/git.aspx/PocketReferences/, return code 22
fatal: git-http-push failed
Run Code Online (Sandbox Code Playgroud) 完整错误文字:
致命:无法访问' https://github.com/Repository_name':schannel:无法打开CA文件'C:/Users/Username/AppData/Local/GitHubDesktop/app-1.2.1/resources/app/git/ mingw64/ssl/certs/ca-bundle.crt':没有这样的过程
当我尝试获取,拉取,推送或克隆任何存储库时,应用程序只是停止工作并抛出此错误.bash中的相同命令正常工作
我正在寻找一种方法,在全局范围内禁用 Git SSL 验证,但仅适用于单个远程。
我所知道的唯一方法是这两种可能性:
git config --global http.sslVerify falsegit config --local http.sslVerify false但是有没有机会像使用代理设置一样设置配置?例如:
我的~/.gitconfig. 但我没有使用本地代理设置覆盖它,而是使用了:
git config --global remote.<remote name>.proxy "" (在这种情况下为直接连接)
不幸的是,以下内容不起作用:
git config --global remote.<remote name>.http.sslVerify false
有任何想法吗?感谢致敬!
关于如何禁用 git 的 http ssl 验证有多个问题(请检查How do I set GIT_SSL_NO_VERIFY for certain repos only?和Unable to set the sslVerify to false)。
但是,我无法找到禁用验证的潜在安全影响的全面描述。
这种行为的风险有多大?为什么?