git - 在证书错误中安装 Git for Windows 失败
问题描述
我正在尝试在 Windows10 上安装 Git,但无法克服证书错误。命令提示符中的错误事件如下。
git clone http://-----.git
cloning into '-----'
fatal:UriFormatException encountered
queryURL
Password for '[proxy]':
fatal:unable to access 'https://----git':error setting certificate verify location
CAfile C:\XX\YY\ZZ\ca-bundle.crt
CApath:none
ca-bundle.crt
在C:\XX\ZZ
目录中,而不是在上面的目录中。
令人惊讶的是, 尽管 gitconfig 文件被成功重写,但既没有git config --global http.sslcainfo "C:\XX\ZZ\ca-bundle.crt"
也没有改变任何结果。
有什么建议或信息需要帮助吗?git config --global http.sslVerify false
现在有更多
git config --global --edit
节目
[http]
proxy=------
sslCAinfo=----
但是git clone
命令给我带来了同样的错误。
解决方案
你可以在这里找到答案
您可以设置GIT_SSL_NO_VERIFY
为true
:
GIT_SSL_NO_VERIFY=true git clone https://example.com/path/to/git
或者将 Git 配置为不在命令行上验证连接:
git -c http.sslVerify=false clone https://example.com/path/to/git
请注意,如果您不验证 SSL/TLS 证书,那么您很容易受到中间人攻击。
推荐阅读
- maven - 错误:无法解析 POM java.io.IOException:无法运行程序“/lib/jvm/java-1.8.0-openjdk-1.8.0.302.b08-0.amzn2.0.1.x86_64/bin/java”
- php - 从微时间数组中获取最新信息
- java - JCompenents 不随 JFrame 一起移动
- azure-devops - 将输出变量传递给运行结果
- node.js - 为什么 fs.readFile 第一次 fetch 调用返回 null?
- python - PyTorch CUDA:张量的“to(设备)”与“设备=设备”?
- php - 导入允许从mysql到elasticsearch的空数据
- python-3.x - 在 Python 中使用 crcmod 生成校验和
- php - 如何在 Laravel Dusk 中获取会话数据?
- docker - Docker:无法安装特定的 pip 包