我的git客户端在尝试克隆存储库一段时间后反复失败,出现以下错误。
这里的问题是什么?
注意:我已经向GIT托管提供商注册了我的SSH密钥
Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly
我的git客户端在尝试克隆存储库一段时间后反复失败,出现以下错误。
这里的问题是什么?
注意:我已经向GIT托管提供商注册了我的SSH密钥
Receiving objects: 13% (1309/10065), 796.00 KiB | 6 KiB/s
fatal: The remote end hung up unexpectedly
当前回答
奥林匹克广播服务公司。:修改http。postBuffer可能还需要设置Nginx配置文件,让gitlab通过调优client_max_body_size的值来接受更大的客户端尺寸。
然而,如果你可以访问Gitlab机器或其网络中的机器,就有一个解决方案,那就是使用git bundle。
转到源计算机上的git存储库 运行git bundle create my-repo。包——所有 (如转移。, rsync) my-repo。绑定文件到目标计算机 在目标机器上,运行git clone my-repo.bundle Git远程地址:path/to/your/repo.git git推
祝你一切顺利!
其他回答
如果你正在使用https,你会得到错误。
我使用https而不是http,它解决了我的问题
git config --global https.postBuffer 524288000
我发现我的问题是与.netrc文件,如果是这样,那么你也可以做以下:
打开你的.netrc文件并编辑它以包含github凭证。 输入nano ~/netrc或gedit ~/netrc
然后包括以下内容: *机器github.com
登录用户名
密码的秘密
机器api.github.com
登录用户名
密码的秘密*
你可以在那里包括你的原始密码,但出于安全考虑,在这里生成一个认证令牌github令牌,并粘贴它在你的密码的地方。
希望这对大家有所帮助
我也遇到过类似的问题,不过是竹子做的活。竹是失败的做本地克隆(本地但通过SSH代理)缓存的存储库,我删除了缓存,之后它工作了,但任何时候它试图从本地缓存克隆有一个失败。似乎是bamboo的SSH代理版本的问题,而不是git本身。
上面的技巧对我没有帮助,因为repo比github允许的最大推送大小还要大。有效的方法是来自https://github.com/git-lfs/git-lfs/issues/3758的建议,建议每次推一点:
If your branch has a long history, you can try pushing a smaller number of commits at a time (say, 2000) with something like this: git rev-list --reverse master | ruby -ne 'i ||= 0; i += 1; puts $_ if i % 2000 == 0' | xargs -I{} git push origin +{}:refs/heads/master That will walk through the history of master, pushing objects 2000 at a time. (You can, of course, substitute a different branch in both places if you like.) When that's done, you should be able to push master one final time, and things should be up to date. If 2000 is too many and you hit the problem again, you can adjust the number so it's smaller.
我在Kubuntu使用git时遇到了这个问题。我还注意到网络的整体不稳定,并找到了解决方案。
在/etc/resolv.conf 将该行添加到文件的末尾 选择单请求
这固定延迟之前,每个域名解析和git开始工作像一个魅力之后。