You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Gitea 1.22.3 Docker部署(TrueNAS)推送失败:pre-receive钩子解码错误

Gitea 1.22.3(Docker/TrueNAS)代码推送失败问题

在TrueNAS上通过Docker运行Gitea 1.22.3时,推送代码至Git仓库触发错误。经确认,移除仓库目录下的pre-receive钩子文件git/repositories/user/somerepo/hooks/pre-receive.d/gitea后,推送可正常执行。

错误日志

remote: Gitea: Internal Server Error Decoding Failed        
remote: Gitea: HookPreReceive(last) failed: unable to decode error response "POST https://localhost:44880/api/internal/hook/pre-receive/user/somerepo": readObjectStart: expect { or n, but found <, error found in #2 byte of ...|        
remote: <!DOCTYPE h|..., bigger context ...|        
remote: <!DOCTYPE html>        
remote: <html lang="en-US" data-theme="gite|...        

排查情况

  • 使用搭载TrueNAS证书的HTTPS协议推送,问题复现;切换为HTTP协议后,问题仍存在。
  • 执行gitea doctor check命令,所有检查项均显示正常,输出如下:
gitea-788cb9d4d7-4k9f4:/var/lib/gitea$ gitea doctor check

[1] Check paths and basic configuration
 - [I] Configuration File Path:    "/etc/gitea/app.ini"
 - [I] Repository Root Path:       "/var/lib/gitea/git/repositories"
 - [I] Data Root Path:             "/var/lib/gitea"
 - [I] Custom File Root Path:      "/var/lib/gitea/custom"
 - [I] Work directory:             "/var/lib/gitea"
 - [I] Log Root Path:              "/var/lib/gitea/data/log"
OK

[2] Check Database Version
 - [I] Expected database version: 299
OK

[3] Check if user with wrong type exist
OK

[4] Check if OpenSSH authorized_keys file is up-to-date
OK

[5] Synchronize repo HEADs
 - [I] All 104 repos have their HEADs in the correct state
OK

All done (checks: 5).

内容的提问来源于stack exchange,提问作者Martin Edlman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 19:51:17