git 错误:RPC 失败;卷曲 56 GnuTLS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38378914/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
git error: RPC failed; curl 56 GnuTLS
提问by user
I use Ubuntu 16.04. When I want to git push origin master I get: error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received. fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to-date
我使用 Ubuntu 16.04。当我想 git push origin master 我得到:error: RPC failed; curl 56 GnuTLS recv 错误 (-12):已收到 TLS 致命警报。致命:远端意外挂断 致命:远端意外挂断 一切都是最新的
采纳答案by Harlequin
To solve this issue:
要解决此问题:
Rebuilding git with opensslinstead of gnutlsfixed my problem.
使用openssl而不是gnutls重建 git解决了我的问题。
I followed these instructions
我遵循了这些说明
回答by Killer
The accepted answer from @harlequin might work, but I spend 2 hours and could not build git package from source code.
@harlequin 接受的答案可能有效,但我花了 2 个小时无法从源代码构建 git 包。
However, Check the below link as this works for me.
但是,请检查以下链接,因为这对我有用。
The remote end hung up unexpectedly while git cloning
just update the http post buffer value
只需更新http post缓冲区值
git config --global http.postBuffer 1048576000
回答by u7192265
After reading your posts, I solved it simply by
看完你的帖子后,我简单地解决了它
apt install gnutls-bin
回答by hsandt
I have a workaroundif you need to clone or pull and the problem lies in the size of the repository history. It may also help when you want to push later, with no guarantee.
如果您需要克隆或拉取并且问题在于存储库历史记录的大小,我有一个解决方法。当您想稍后推送时,它也可能有所帮助,但不能保证。
Simply retrieve the last commits with --depth=[number of last commits]
.
只需使用 检索最后一次提交--depth=[number of last commits]
。
You can do this at clone time, or, if working from a local repository to which you added a remote, at pull time. For instance, to only retrieve the last commit (of each branch):
您可以在克隆时执行此操作,或者,如果从添加了远程的本地存储库工作,则在拉取时执行此操作。例如,仅检索(每个分支的)最后一次提交:
git clone repo --depth=1
# or
git pull --depth=1
UPDATE: if the remote is getting too much ahead of you, the issue may come back later as you try to pull the last changes, but there are too many and the connection closes with curl 56. You may have to git pull --depth=[number of commits ahead on remote]
, which is tedious if you're working on a very active repository.
更新:如果遥控器超出您的范围,那么当您尝试拉取最后一次更改时,问题可能会在稍后再次出现,但数量太多,连接会以 curl 56 关闭。您可能必须这样做git pull --depth=[number of commits ahead on remote]
,如果这样做会很乏味您正在处理一个非常活跃的存储库。
回答by Ramesh Kotkar
You can set some option to resolve the issue
您可以设置一些选项来解决问题
Either at global level: (needed if you clone
, don't forget to reset after)
无论是在全球层面:(如果你需要clone
,不要忘记重置)
$ git config --global http.sslVerify false
$ git config --global http.postBuffer 1048576000
or on a local repository
或在本地存储库上
$ git config http.sslVerify false
$ git config http.postBuffer 1048576000
回答by Eric Wang
I am also using Ubuntu
based system (Mint mate 18), got the similar issue when clone large repo from github.
我也在使用Ubuntu
基于系统(Mint mate 18),从 github 克隆大型 repo 时遇到了类似的问题。
The simple solution worked for me is to use sshprotocol instead of http(s)protocol.
对我有用的简单解决方案是使用ssh协议而不是http(s)协议。
e.g
例如
git clone [email protected]:xxx/yyy.git
回答by RootCode
I also encountered same and restart of the system resolved it :)
我也遇到了同样的情况,重启系统就解决了:)
回答by Adithya Visnu
Try to upgrading openssl
modules
尝试升级openssl
模块
I solved it by doing that
我这样做解决了
sudo apt install openssl
回答by Bruno Alexandre Rosa
回答by Leo Tavares
I just managed to solve this by cloning using SSH.
我只是设法通过使用 SSH 进行克隆来解决这个问题。
To do that I had to add my machine's SSH key to my account.
为此,我必须将我机器的 SSH 密钥添加到我的帐户中。