This error occurs when I use nginx reverse proxy gitea to execute git push. The problem is restored when I don’t use reverse proxy
gitealog
Nov 14 21:46:37 lingling gitea[27307]: 2022/11/14 21:46:37 [637246bd] router: completed GET /lingling/text66.git/info/refs?service=git-receive-pack for 2.56.255.82:0, 401 Unauthorized in 3.3ms @ repo/http.go:532(repo.GetInfoRefs)
Nov 14 21:46:37 lingling gitea[27307]: 2022/11/14 21:46:37 ...dules/git/command.go:153:Run() [D] [637246bd-2] /var/lib/gitea/data/gitea-repositories/lingling/text66.git: /usr/bin/git -c credential.helper= -c filter.lfs.required= -c filte
Nov 14 21:46:37 lingling gitea[27307]: 2022/11/14 21:46:37 [637246bd-2] router: completed GET /lingling/text66.git/info/refs?service=git-receive-pack for 2.56.255.82:0, 200 OK in 26.1ms @ repo/http.go:532(repo.GetInfoRefs)
nginx log
attempt to set status 403 via ngx.exit after sending out the response status 200
git error
Enumerating objects: 492, done.
Counting objects: 100% (492/492), done.
Delta compression using up to 12 threads
Compressing objects: 100% (414/414), done.
Writing objects: 100% (492/492), 229.61 KiB | 229.61 MiB/s, done.
Total 492 (delta 59), reused 492 (delta 59), pack-reused 0
fatal: protocol error: bad line length character: <htm
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly