mirror of
https://github.com/ZJDoc/GitGuide.git
synced 2026-07-01 01:10:18 +08:00
docs(git): update error
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
|
||||
# error: RPC failed; curl 56 GnuTLS recv error (-9)
|
||||
|
||||
## 问题描述
|
||||
|
||||
下载`Github`仓库时出现如下错误
|
||||
|
||||
```
|
||||
remote: Enumerating objects: 150, done.
|
||||
remote: Counting objects: 100% (150/150), done.
|
||||
remote: Compressing objects: 100% (90/90), done.
|
||||
error: RPC failed; curl 56 GnuTLS recv error (-9): A TLS packet with unexpected length was received.
|
||||
fatal: The remote end hung up unexpectedly
|
||||
fatal: 过早的文件结束符(EOF)
|
||||
fatal: index-pack 失败
|
||||
```
|
||||
|
||||
## 解析
|
||||
|
||||
参考[git error: RPC failed; curl 56 GnuTLS](https://stackoverflow.com/questions/38378914/git-error-rpc-failed-curl-56-gnutls)和[Git 克隆错误‘RPC failed; curl 56 Recv failure....’ 及克隆速度慢问题解决](https://blog.csdn.net/qq_34121797/article/details/79561110),有可能是`http缓存不够`或者`网络不稳定`问题
|
||||
|
||||
* 对于网络不稳定问题
|
||||
|
||||
>Rebuilding git with openssl instead of gnutls fixed my problem.
|
||||
|
||||
* 对于`http`缓存不够
|
||||
|
||||
```
|
||||
# httpBuffer加大
|
||||
$ git config --global http.postBuffer 524288000
|
||||
```
|
||||
|
||||
## 解决
|
||||
|
||||
重新设置了`http`缓存,不过最后是通过码云的方式解决的
|
||||
|
||||
1. 先将`Github`仓库拉取到码云仓库
|
||||
2. 在从码云上下载
|
||||
@@ -133,4 +133,54 @@ $ git config --global http.postBuffer 524288000
|
||||
重新设置了`http`缓存,不过最后是通过码云的方式解决的
|
||||
|
||||
1. 先将`Github`仓库拉取到码云仓库
|
||||
2. 在从码云上下载
|
||||
2. 在从码云上下载
|
||||
|
||||
## 问题六:fatal: 无法读取远程仓库。
|
||||
|
||||
```
|
||||
$ git clone ssh://git@gitlab.zhujian.tech:7020/zjykzj/hexo-blog.git
|
||||
正克隆到 'hexo-blog'...
|
||||
remote:
|
||||
remote: ========================================================================
|
||||
remote:
|
||||
remote: The project you were looking for could not be found.
|
||||
remote:
|
||||
remote: ========================================================================
|
||||
remote:
|
||||
fatal: 无法读取远程仓库。
|
||||
|
||||
请确认您有正确的访问权限并且仓库存在。
|
||||
```
|
||||
|
||||
参考:[How to fix 'The project you were looking for could not be found' when using git clone](https://stackoverflow.com/questions/54571213/how-to-fix-the-project-you-were-looking-for-could-not-be-found-when-using-git)
|
||||
|
||||
添加私钥
|
||||
|
||||
```
|
||||
eval "$(ssh-agent -s)"
|
||||
|
||||
ssh-add ~/.ssh/<id_rsa>
|
||||
```
|
||||
|
||||
## 问题七:fatal: 无法读取远程仓库。
|
||||
|
||||
```
|
||||
$ git push origin master
|
||||
ssh: connect to host ssh.github.com port 443: Connection timed out
|
||||
fatal: 无法读取远程仓库。
|
||||
|
||||
请确认您有正确的访问权限并且仓库存在。
|
||||
```
|
||||
|
||||
1. 激活私钥
|
||||
2. 测试远程登录
|
||||
3. 代理(推荐)
|
||||
|
||||
参考:[git上传代码报错ssh: connect to host github.com port 22: Connection timed out解决办法](https://blog.csdn.net/qq_42146613/article/details/82772734)
|
||||
|
||||
## 问题八:gnutls_handshake() failed: Error in the pull function
|
||||
|
||||
参考:[使用curl出现gnutls_handshake() failed: Error in the pull function或者GnuTLS recv error: Error in the pull](https://blog.csdn.net/anlian523/article/details/90729063)
|
||||
|
||||
* 方法一:`sudo apt-get install libcurl4-openssl-dev`
|
||||
* 方法二:开启代理(推荐)
|
||||
Reference in New Issue
Block a user