使用SourceTree出现 POST git-receive-pack (chunked) 解决方案

问题描述

今天我使用的SourceTree提交到git远程仓库的时候时出现了问题
一直处于下面的这种状态

POST Git-receive-pack (chunked)

问题原因

经过查找资料发现了下面的描述

This is a bug in Git; when using HTTPS it will use chunked encoding for uploads above a certain size. Those do not work.

A trivial fix is to tell git to not chunk until some ridiculously large size value, such as:

git config http.postBuffer 524288000

原因是当远程仓库是https前缀提交时要进行编码,但是缓存大小被限制了,通过改变postBuffer的大小为500M就可以解决这个问题了
按照这个思路就有了如下的解决办法

解决办法

打开SourceTree右上角的

设置 -> 高级 -> 编辑配置文件…

来打开配置文件,在配置文件中添加如下配置

[http] 
      postBuffer = 524288000

最后保存,重新尝试推送到仓库就可以了

你可能感兴趣的:(使用SourceTree出现 POST git-receive-pack (chunked) 解决方案)