Git 错误: 'key does not contain a section: sslVerify' 解决方法

在使用 Git 命令时,您可能会遇到以下错误:

#0 0.890 error: key does not contain a section: sslVerify

#0 0.890 fatal: unable to parse command-line config

这个错误通常是因为命令中使用了 -c sslVerify=false 参数,但是该参数没有被正确解析。

解决方法

您可以尝试将 -c sslVerify=false 参数移动到 git config 命令中:

RUN git config --global http.proxy http://192.168.44.37:7890
RUN git config --global --add http.sslVerify false
RUN git fetch -q --depth 1 origin 'v1.7.0' +refs/tags/*:refs/tags/* && git checkout -q FETCH_HEAD

这里使用了 git config --global --add http.sslVerify false 命令来添加 sslVerify 配置项,并将其设置为 false。然后再执行 git fetchgit checkout 命令即可。

Git 错误:

原文地址: https://www.cveoy.top/t/topic/gR60 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录