我必须管理一个私有的git repo,所以我创建了一个.pem并将http.sslcainfo设置为.pem的路径。但现在我再也无法从Github的回购协议中克隆:
致命:无法访问
https://github.com/KidSysco/jquery-ui-month-picker/”:服务器
证书验证失败。卡菲尔:
/home/marco/sources/git_certs/cert.pem crlfile:无
http.sslcainfo的默认值是多少?我试着把它设置为“”但是现在我得到了
致命:无法访问“https://github.com/KidSysco/jquery-ui-month-picker/”:SSL CA证书(路径?访问权限?)

最佳答案

您还可以运行以下命令来获得openssl正在使用的“正确”目录(在linux/git bash下)。这将以引号输出目录,因此您不需要执行任何特殊的魔术来处理空格,并且可以将其直接传递到另一个命令。
openssl version -d | awk '{ print $2 }'
因此您可以使用以下方法修复git配置:
git config --global http.sslCAInfo $(openssl version -d | awk '{ print $2 }')

08-27 03:57