惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
Security Latest
Security Latest
NISL@THU
NISL@THU
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
W
WeLiveSecurity
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
T
Tor Project blog
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
雷峰网
雷峰网
L
LINUX DO - 热门话题
The GitHub Blog
The GitHub Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
P
Privacy & Cybersecurity Law Blog
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
MyScale Blog
MyScale Blog
B
Blog RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
K
Kaspersky official blog
Attack and Defense Labs
Attack and Defense Labs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
有赞技术团队
有赞技术团队
Know Your Adversary
Know Your Adversary
Hacker News - Newest:
Hacker News - Newest: "LLM"
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
博客园 - 【当耐特】
S
Security Affairs
The Cloudflare Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
AI
AI
H
Help Net Security
美团技术团队
T
Threatpost
Project Zero
Project Zero

Nicksxs's Blog

学一下chrome的扩展开发 看下chrome的内置模型 从 app.test 到小锁:valet 本地 HTTPS 的完整链路 浅析一下jpeg图片格式及其来源 关于github拉取下载加速的另一个方式 关于适合什么模型,推荐下llmfit 看看目前本地能跑什么模型,使用llama.cpp 最近使用vibe coding的一些感悟 使用php的inotify扩展来监听文件变更 一些设计模式的记忆点 使用xiaomi mimo大模型api运行Hermes Agent 结合Obsidian的cli的一体化体验 开始尝试使用obsidian作为笔记软件 学习下大神的知识库 体验下微软开源的Markdown转换工具Markitdown 学习下git的worktree 一些架构师知识点的记录 解答一下关于traefik的一点疑惑 记录一下迁移服务器需要使用的一些命令 较早代iPhone更换新iPhone的一些小指南 如何查看mac的路由表和网关等信息 如何开启mysql的optimizer trace 浅析下mysql的索引的基数与可选择性 分享个加速github访问的方法 学习体验下Koupleless框架-浅析代码 学习体验下Koupleless框架 体验下nocodb这个神奇的系统 学习下MDC的机制 重新复习理解下java的类加载器 记录下ffmpeg命令 尝试学习理解下Claude Code的实现原理和细节 在Antigravity中对比体验Claude Sonnet 4.5模型 来看下我装备了5060TI显卡的gpt-oss模型表现 来看下google最新力作Antigravity的水平如何
记一个gitea推送失败的问题
Nicksxs · 2026-07-19 · via Nicksxs's Blog

我的博客的推送一份是在github
作为github page,另一份是在自建的gitea上面
上周突然就出现推送失败了
在gpt5.5老师的指导下一顿查gitea服务器的日志也没查出来原因
一开始说是可以尝试从https切换到ssh形式也没起作用
服务端日志也没有用的
然后这次升级了gpt5.6老师以后,就再问了下

1
2
3
4
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (6455/6455), 2.95 MiB | 1.53 MiB/s, done.
Total 6455 (delta 2752), reused 6281 (delta 2580), pack-reused 0
fatal: the remote end hung up unexpectedly

这次的日志比较有价值可能
另外还有个信息是之前git gc因为仓库的小文件太多了可能
然后这次gpt老师给出的方法是

1
2
http.postBuffer = 16777216
http.version = HTTP/1.1

把postBuffer给调大了,然后直接在仓库里执行

1
git -C .deploy_git push --verbose

发现直接可以了
具体原因分析下来是: 推送产生的请求体约为 2.95 MiB,超过了 Git 默认 1 MiB 的 http.postBuffer。

1
2
3
4
5
6
7
8
9
10
11
推送数据 2.95 MiB
↓ 超过默认缓冲区 1 MiB
Git 改用 chunked 分块传输

Traefik / Gitea 链路没有正确处理该请求

返回 HTTP 200,但响应体为 0

Git 收不到 receive-pack 的 sideband 结果

unexpected disconnect

因为默认的postBuffer不够大,然后使用了chunked传输,是指一块块传,直到最后一块大小为0
然后因为我的gitea可能经过了traefik和gitea中间有不支持的
关于postBuffer在git官方文档也有解释

http.postBuffer

1
2
3
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
2
3
4
5
Git 使用智能 HTTP 传输协议向远程服务器发送 POST 请求时,所使用缓冲区的最大大小,单位为字节。
当请求大小超过这个缓冲区时,Git 会使用 HTTP/1.1 的 Transfer-Encoding: chunked,也就是分块传输编码,以避免在本地创建一个非常大的 pack 文件。
默认值是 1 MiB,对于大多数请求来说已经足够。
需要注意的是,增大这个值的作用仅仅是停用分块传输编码。因此,只有在远程服务器或中间代理仅支持 HTTP/1.0,或者没有正确遵循 HTTP 标准时,才应该提高这个限制。
一般来说,增大这个值并不能解决大多数 Git 推送问题。同时它还可能显著增加内存占用,因为即使实际推送的数据很小,Git 也会分配完整大小的缓冲区。

对于我这样的hexo是在.deploy_git目录里的.git/config文件
普通git仓库如果要配置就是在.git/config里进行配置

1
2
3
[http]
postBuffer = 16777216
version = HTTP/1.1

可以直接改这个文件,也可以用git配置命令

1
2
git config http.postBuffer 16777216
git config http.version HTTP/1.1

这样都可以,在现在这个时代
发现这样一个小技巧或者小问题的答案
我还是想记录下
因为很多的东西感觉已经被GPT这样的颠覆掉了
有这些小的问题被解决
感觉有种久违的愉悦感
排查问题,找到原因是个很有意思的过程
并把它解决也是很有意思
这个可能就算是初心了吧
就能把解决问题的思路方法分享下
也是一种比较开始的事情