git拉代码出现问题解决方案

784 阅读1分钟

一、对于在git上面拉代码报"error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, err

主要原因是安全设置的问题:

首先执行

git config http.sslVerify "false" 

 若出现下列错误

 fatal: not in a git directory

再继续执行 

git config --global   http.sslVerify "false"

 问题解决

二、error: RPC failed; curl 18 transfer closed with outstanding read data remaining

1、加大缓存区

git config --global http.postBuffer 524288000
git config --list

2、换协议

clone http方式换成SSH的方式,即 https:// 改为 git:// 例如git clone https://github.com/flutter/flutter.git 换成git clone git://github.com/flutter/flutter.git 

3、少clone一些,–depth 1

git clone https://github.com/flutter/flutter.git --depth 1
–depth 1的含义是复制深度为1,就是每个文件只取最近一次提交,不是整个历史版本。