Issue with "fatal: protocol error" on OpenBSD using git push #3727

Closed
opened 2025-11-02 05:23:14 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @daemhan on GitHub (Aug 4, 2019).

  • Gitea version (or commit ref): 1.7.4 built with go1.12.1
  • Git version: 2.21.0
  • Operating system: OpenBSD 6.5
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: no log entries from protocol error.

Description

Using https to push to gitea from local.

I was able to use git push -u origin master without issue. I added files, and tried to push these using git push, and received this error:
fatal: protocol error: bad line length character: POST

I removed the .git folder, reinitialized everything, and started adding files and directories to be tracked one by one when it dawned on me that the error occurred after I got tired of adding individual files/directories and added everything at once. While doing this one file/directory at a time, I got to the following and ran into the error:

git add roles/
git commit -m 'adding roles dir'
git push
fatal: protocol error: bad line length character: POST

I attempted to remove the folder from tracking, made a commit about the removal, tried to push again, and the same error comes up.

git rm -r roles/
git commit -m 'removing directory from tracking'
git push
fatal: protocol error: bad line length character: POST

Screenshots

N/A

Originally created by @daemhan on GitHub (Aug 4, 2019). - Gitea version (or commit ref): 1.7.4 built with go1.12.1 - Git version: 2.21.0 - Operating system: OpenBSD 6.5 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: no log entries from protocol error. ## Description Using https to push to gitea from local. I was able to use git push -u origin master without issue. I added files, and tried to push these using git push, and received this error: fatal: protocol error: bad line length character: POST I removed the .git folder, reinitialized everything, and started adding files and directories to be tracked one by one when it dawned on me that the error occurred after I got tired of adding individual files/directories and added everything at once. While doing this one file/directory at a time, I got to the following and ran into the error: git add roles/ git commit -m 'adding roles dir' git push fatal: protocol error: bad line length character: POST I attempted to remove the folder from tracking, made a commit about the removal, tried to push again, and the same error comes up. git rm -r roles/ git commit -m 'removing directory from tracking' git push fatal: protocol error: bad line length character: POST ## Screenshots N/A
GiteaMirror added the type/question label 2025-11-02 05:23:14 -06:00
Author
Owner

@lafriks commented on GitHub (Aug 4, 2019):

What protocol are Gitea listening on? (http, fastcgi etc)

@lafriks commented on GitHub (Aug 4, 2019): What protocol are Gitea listening on? (http, fastcgi etc)
Author
Owner

@lunny commented on GitHub (Aug 5, 2019):

Could you use a recent version(1.9.0) than 1.7.4 ?

@lunny commented on GitHub (Aug 5, 2019): Could you use a recent version(1.9.0) than 1.7.4 ?
Author
Owner

@daemhan commented on GitHub (Aug 31, 2019):

Hello,

Notification failure.

I'm currently using fastcgi for serving the front end, but I use https for git push/pull.

It is not possible to use 1.9.0 at this time.

@daemhan commented on GitHub (Aug 31, 2019): Hello, Notification failure. I'm currently using fastcgi for serving the front end, but I use https for git push/pull. It is not possible to use 1.9.0 at this time.
Author
Owner

@stale[bot] commented on GitHub (Oct 30, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Oct 30, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Nov 2, 2019):

Have you set ROOT_URL different from LOCAL_ROOT_URL.

@lunny commented on GitHub (Nov 2, 2019): Have you set `ROOT_URL` different from `LOCAL_ROOT_URL`.
Author
Owner

@daemhan commented on GitHub (Nov 2, 2019):

They are the same.

@daemhan commented on GitHub (Nov 2, 2019): They are the same.
Author
Owner

@lunny commented on GitHub (Nov 2, 2019):

@daemhan You should change them. ROOT_URL should be http/https for user clone/pull/push, LOCAL_ROOT_URL should be your fastcgi protocol address.

@lunny commented on GitHub (Nov 2, 2019): @daemhan You should change them. ROOT_URL should be http/https for user clone/pull/push, LOCAL_ROOT_URL should be your fastcgi protocol address.
Author
Owner

@lafriks commented on GitHub (Nov 26, 2019):

Closing as answered, please reopen if not

@lafriks commented on GitHub (Nov 26, 2019): Closing as answered, please reopen if not
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3727