git clone/pull/push 常见报错

友情提醒:本文最后更新于 1365 天前,文中所描述的信息可能已发生改变,请谨慎使用。

1.server certificate verification failed

server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

解决方案:

export GIT_SSL_NO_VERIFY=1

2.fatal: unable to access 'xxxx.git'

fatal: unable to access 'https://git.zhengyitech.com/demo/cola.git/': server certificate verification failed. CAfile: none CRLfile: none

解决方案:

git config --global http.sslVerify false

3.Unable to negotiate with 'x.x.x.x' port 'x'

Unable to negotiate with 192.168.1.100 port 19569: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

解决方案:

# 创建或修改 ~/.ssh/config,加入
Host *
    KexAlgorithms +diffie-hellman-group1-sha1

4.fatal: 无法访问 'http://git..com/.git/':SSL certificate problem: certificate has expired

解决方案:

git config --global http.sslVerify false

上一篇:使用OpenCV定位小图在大图中的位置

下一篇:MySQL 8.0数据库创建数据库、添加用户和授权