git 常见报错整理

1、SSL certificate problem: certificate has expired

错误如下:

Git Pull Failed

unable to access ‘https:/xxxxxxx.git/’: SSL certificate problem: certificate has expired

解决方案:通过git bash打开git命令行,输入: git config --global http.sslVerify false 即可

 git config --global http.sslVerify false
2、Git报错-refusing to merge unrelated histories

错误如下:

Git Pull Failed
POST git-upload-pack (316 bytes)
From https://gitee.com/specking/study

branch master -> FETCH_HEAD
= [up to date] master -> origin/master
refusing to merge unrelated histories

原因:出现这个问题的最主要原因还是在于本地仓库和远程仓库实际上是独立的两个仓库。假如我之前是直接clone的方式在本地建立起远程github仓库的克隆本地仓库就不会有这问题了

解决方案:命令行输入

git pull origin master --allow-unrelated-histories
3、clone时出现RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errfno 10054

错误如下:

Clone failed
RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
663 bytes of body are still expected
the remote end hung up unexpectedly
early EOF
index-pack failed

原因:原因:出现这种问题可能是文件太大了
curl的postBuffer的默认值较小,需要在终端调整为到合适的大小,这里调整到500M

解决方法:

命令行输入输入以下3个命令:

git init

git config http.postBuffer 524288000

git config http.sslVerify "false"

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值