使用便携式版本的git version 2.22.0.windows.1
,该版本安装在H:
是UNC \\some\path
我有一个代理,设置了HTTP_PROXY
和HTTPS_PROXY
。
cmd
H:\>git clone https://gitHub.com/user/repo
Cloning into 'repo'...
fatal: unable to access 'https://gitHub.com/user/repo/': error setting certificate verify locations:
CAfile: /some-path/PortableGit/mingw64/ssl/certs/ca-bundle.crt
CApath: none
文件存在
H:>dir H:\PortableGit\mingw64\ssl\certs\ca-bundle.crt
...
08/06/2019 07:43 207 436 ca-bundle.crt
...
H:>dir \\some\path\PortableGit\mingw64\ssl\certs\ca-bundle.crt
...
08/06/2019 07:43 207 436 ca-bundle.crt
…
在数字ST之后,我设置了http.sslCAinfo
H:>git config --system http.sslcainfo "H:\PortableGit\mingw64\ssl\certs\ca-bundle.crt"
我们可以确认已将其记入帐户
H:>git config --list --show-origin
file://some/path/PortableGit/mingw64/etc/gitconfig http.sslcainfo=H:\PortableGit\mingw64\ssl\certs\ca-bundle.crt
但是上面的错误仍然显示。其实我可以将sslcainfo设置为任何内容,没关系,它总是说
H:\>git config --system http.sslcainfo "duh"
H:\>git clone https://github.com/user/repo
Cloning into 'repo'...
fatal: unable to access 'https://github.com/user/repo/': error setting certificate verify locations:
CAfile: /some/path/PortableGit/mingw64/ssl/certs/ca-bundle.crt
CApath: none