参考链接:others-How to solve ‘gnutls_handshake() failed’ error when doing ‘git clone’ from github ?

Errors

Cloning into 'GlobalTrack'...
fatal: unable to access 'https://github/xxx.git/': 
error setting certificate verify locations:
CAfile: E:/dev/env/Git/mingw64/ssl/certs/ca-bundle.crt CApath: none

Solution #1(如果不行,直接看解决方案3,最后再考虑解决方案2)

https 修改为 http

# git clone https://github/MasterBin-IIAU/Unicorn.git unicorn
git clone http://github/MasterBin-IIAU/Unicorn.git unicorn

Solution #2(暴力解决,不推荐使用)

git config --global http.sslverify "false"

设置后,最好重启下当前终端,然后执行 git clone

Solution #3(指定证书的路径,推荐使用)

  • Ubuntu 18.04 中的 CA 证书位置 | 智问智答
  • git clone: error setting certificate verify locations · Issue #36 · scalingexcellence/scrapybook
# 如果报 fatal: not in a git directory, 先执行 git init 命令
# git init
sudo git config --system http.sslCAinfo /etc/ssl/certs/ca-certificates.crt

注意,需要重启当前终端!!!

更多推荐

git clone失败:Cloning into... fatal: unable to access... error setting certificate