Error 500 while creating Pull Request - Due to LFS hooks inside Gitea's repositories #10539

Closed
opened 2025-11-02 09:10:44 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @Voscha on GitHub (Mar 28, 2023).

Description

I get an error 500 at the end of creating a pull request from a feature branch into the master branch, both in the same repository.
Entries in the log file:

2023/03/28 08:05:04 ...ervices/pull/pull.go:461:pushToBaseRepoHelper() [E] [6422838c-3] Unable to push PR head for WK_Agrosoft/HANNIBAL#16 (7:WK_Agrosoft/HANNIBAL:refs/pull/16/head) due to Error: exit status 1 - batch request: missing protocol: ""
	batch request: missing protocol: ""
	batch request: missing protocol: ""
	error: failed to push some refs to 'C:\Entwicklung\wk_agrosoft\hannibal.git'
	
2023/03/28 08:05:04 ...ers/web/repo/pull.go:1282:CompareAndPullRequestPost() [E] NewPullRequest: Push: WK_Agrosoft/HANNIBAL:Feature-Pull-Request WK_Agrosoft/HANNIBAL:refs/pull/16/head exit status 1 - batch request: missing protocol: ""
	batch request: missing protocol: ""
	batch request: missing protocol: ""
	error: failed to push some refs to 'C:\Entwicklung\wk_agrosoft\hannibal.git'
	
2023/03/28 08:05:04 ...user/notification.go:45:func1() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) [1 1] - 3.1044ms


At the end the pull request has been created but with 0 commits and the message "pull-Request is broken..."

image

The same pull request can be created without error if i merge the feature branch from a forked repository into the origin/master branch.

Gitea Version

1.19.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

2.39.2, Wire Protocol Version 2 Enabled

Operating System

Windows Server 2016

How are you running Gitea?

Gitea running as a service, installed from https://dl.gitea.com/

Database

MySQL

Originally created by @Voscha on GitHub (Mar 28, 2023). ### Description I get an error 500 at the end of creating a pull request from a feature branch into the master branch, both in the same repository. Entries in the log file: ``` 2023/03/28 08:05:04 ...ervices/pull/pull.go:461:pushToBaseRepoHelper() [E] [6422838c-3] Unable to push PR head for WK_Agrosoft/HANNIBAL#16 (7:WK_Agrosoft/HANNIBAL:refs/pull/16/head) due to Error: exit status 1 - batch request: missing protocol: "" batch request: missing protocol: "" batch request: missing protocol: "" error: failed to push some refs to 'C:\Entwicklung\wk_agrosoft\hannibal.git' 2023/03/28 08:05:04 ...ers/web/repo/pull.go:1282:CompareAndPullRequestPost() [E] NewPullRequest: Push: WK_Agrosoft/HANNIBAL:Feature-Pull-Request WK_Agrosoft/HANNIBAL:refs/pull/16/head exit status 1 - batch request: missing protocol: "" batch request: missing protocol: "" batch request: missing protocol: "" error: failed to push some refs to 'C:\Entwicklung\wk_agrosoft\hannibal.git' 2023/03/28 08:05:04 ...user/notification.go:45:func1() [I] [SQL] SELECT count(*) FROM `notification` WHERE (user_id = ?) AND (status = ?) [1 1] - 3.1044ms ``` At the end the pull request has been created but with 0 commits and the message "pull-Request is broken..." ![image](https://user-images.githubusercontent.com/45467803/228146918-b560e5ff-3d70-41fb-8c87-e6babf7e388f.png) The same pull request can be created without error if i merge the feature branch from a forked repository into the origin/master branch. ### Gitea Version 1.19.0 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.39.2, Wire Protocol Version 2 Enabled ### Operating System Windows Server 2016 ### How are you running Gitea? Gitea running as a service, installed from https://dl.gitea.com/ ### Database MySQL
GiteaMirror added the type/question label 2025-11-02 09:10:44 -06:00
Author
Owner

@zeripath commented on GitHub (Mar 28, 2023):

batch request: missing protocol: ""

Implies that you have lfs hooks installed in Gitea's own repositories. Remove them.

@zeripath commented on GitHub (Mar 28, 2023): ``` batch request: missing protocol: "" ``` Implies that you have lfs hooks installed in Gitea's own repositories. Remove them.
Author
Owner

@Voscha commented on GitHub (Mar 28, 2023):

Thank you @zeripath.
I could resolve the problem, deleting some old git lfs hooks from the repository/hooks directory.

@Voscha commented on GitHub (Mar 28, 2023): Thank you @zeripath. I could resolve the problem, deleting some old git lfs hooks from the repository/hooks directory.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10539