git push 在 Total 行后挂起

标签 git bitbucket

我的 git push 在显示完成推送后挂起。我要去 推送

Counting objects: 51, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (47/47), done.
Writing objects: 100% (47/47), 27.64 MiB | 6.47 MiB/s, done.
Total 47 (delta 4), reused 0 (delta 0)

它卡在这里,我必须按 control-c 才能返回命令行。我过去对这个项目做了几次没有问题的 promise 。我在我的机器上尝试过其他 repo 协议(protocol),它们工作正常。这是怎么回事?

最佳答案

https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer

http.postBuffer

Maximum size in bytes of the buffer used by smart HTTP transports when POSTing data to the remote system. For requests larger than this buffer size, HTTP/1.1 and Transfer-Encoding: chunked is used to avoid creating a massive pack file locally. Default is 1 MiB, which is sufficient for most requests.

Note that raising this limit is only effective for disabling chunked transfer encoding and therefore should be used only where the remote server or a proxy only supports HTTP/1.0 or is noncompliant with the HTTP standard. Raising this is not, in general, an effective solution for most push problems, but can increase memory consumption significantly since the entire buffer is allocated even for small pushes.

分辨率

  1. 将 Git 缓冲区大小增加到您的存储库的最大单个文件大小

  2. git config --global http.postBuffer 157286400

  3. 引用Git push fails - client intended to send too large chunked body的决议用于 ngnix 反向代理配置。将此参数增加到您的存储库的最大单个文件大小。

  4. 按照 Can't clone or pull due to a git outbound proxy 中的说明绕过出站代理

关于git push 在 Total 行后挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15843937/

相关文章:

git - gitrebase 的 Vim 文件类型插件

Github:在 pull 请求期间 merge 提交

git - 修剪空格

git - 以编程方式在 Bitbucket 上创建 pull 请求?

bitbucket - 如何将bitbucket管道设置为手动触发?

git - 如何在 git 提交损坏的网站中查找特定文件的代码?

git - 为什么 Jenkins 在从 git 获取时失败,而命令行却没有?

git - 如何正确使用 git 工作流程和 rebase?

html-lists - 如何在 Bitbucket 中标记嵌套列表项?

windows - Git Hook 未在 Windows 上运行