简体   繁体   English

我最近不能git推,我的Git发生了什么?

[英]I can't git push recently, what happened to my Git?

Recently, I try to git push my recent project to GitHub, but it can't, it blocked like this: 最近,我尝试git push我最近的项目git push送到GitHub,但它不能,它被阻止如下:

$ git push web4 master
Counting objects: 1035, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (645/645), done.
Writing objects: 100% (1035/1035), 49.44 MiB | 16.01 MiB/s, done.
Total 1035 (delta 298), reused 227 (delta 61)

And didn't move at all, so I have to cancel. 并没有动,所以我必须取消。 I also tried to use idea VCS, and it didn't work either. 我也试过使用VCS的想法,但它也没有用。 It said: 它说:

Push failed
Failed with error: fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; result=56, HTTP code = 200

And tried change the remote and post buffer, too. 并尝试更改远程和后缓冲区。 All didn't work. 一切都行不通。 So, what happened on earth? 那么,地球上发生了什么?

The issue can be related to git/https buffer settings. 该问题可能与git / https缓冲区设置有关。 The default file post size might be exceeded. 可能会超出默认文件发布大小。 Try to run the following command ant then try to push again. 尝试运行以下命令ant然后尝试再次推送。

git config http.postBuffer 524288000

If you are posting over ssh instead of http, so use the following: 如果您通过ssh而不是http发布,请使用以下内容:

git config ssh.postBuffer 524288000 

It increases the buffer to ~500MB and may solve the problem. 它将缓冲区增加到~500MB并可以解决问题。

另外,如果您使用的是nginx,请将client_max_body_size更改为0.这将允许您推送任何大小的数据。

client_max_body_size 0 

它可能是一个互联网错误,当我尝试git推送其他存储库而不仅仅是在github,它成功。可能有我的位置的一些原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM