我正在尝试使用https-URL克隆我的GitHub项目,但它失败并出现错误:
$ git clone https://foo@github.com/foo/foo-private.git
Cloning into foo-private...
Password:
error: error setting certificate verify locations:
CAfile: /bin/curl-ca-bundle.crt
CApath: none
while accessing https://foo@github.com/foo/foo-private.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
在Cygwin上使用git获取时,您会得到:
Fetching origin
fatal: unable to access 'https://.../...git': SSL certificate problem: self signed certificate in certificate chain
error: Could not fetch origin
Run Code Online (Sandbox Code Playgroud)
该证书被添加到/etc/ssl/certs/ca-bundle.crt和其他捆绑的文件,但在接下来的Cygwin更新的问题又出现了.
所以我正在运行OpenSUSE Leap 42.1和Git 2.6.6.直到今天,我从远程GitHub仓库推送/拉取/取出时没有任何问题.
现在,今天,我收到此错误消息:
fatal: unable to access 'https://github.com/myName/myProject.git/': error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
Run Code Online (Sandbox Code Playgroud)
无论何时我进行推/拉/取,我都会得到这个.我的第一个想法是检查提供的文件路径,并且/ etc/ssl/certs中不存在名为ca-certificates.crt的文件.
所以...我不完全确定该怎么做.不知道为什么这突然停止工作,也许操作系统或git更新打破了它?无论哪种方式,都指向正确的方向.
谢谢.