Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Voscha opened this issue Mar 28, 2023 · 2 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@Voscha
Copy link

Voscha commented 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

@zeripath
Copy link
Contributor

batch request: missing protocol: ""

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

@zeripath zeripath added type/question Issue needs no code to be fixed, only a description on how to fix it yourself. and removed type/bug labels Mar 28, 2023
@zeripath zeripath changed the title Error 500 while creating Pull Request Error 500 while creating Pull Request - Due to LFS hooks inside Gitea's repositories Mar 28, 2023
@Voscha
Copy link
Author

Voscha commented Mar 28, 2023

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

@Voscha Voscha closed this as completed Mar 28, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants