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

编程知识 更新时间:2023-04-06 11:15:48

参考链接: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

本文发布于:2023-04-06 11:15:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/a5414c39bd120469a2555e0efb99980c.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:fatal   unable   Cloning   git   clone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 49258文章数
  • 14阅读数
  • 0评论数