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
相关产品推荐
相关产品推荐

