Gitea Unable to create Pull Request via WebUI - (deny updating a hidden ref)

Yesterday when I was trying to do a pull request like usual, I noticed I can not create one through the WebUI, instead what I got is this:

Push Failed: The push was rejected but there was no remote message. Review the Git Hooks for this repository.

I've checked the response from the browser and the message from the API was simply that message. So I went into the logs and found the line below.

[remote rejected] patch -> refs/pull/1/head (deny updating a hidden ref)


However, I could not find any resource on what is causing this issue anywhere on the internet. No issue created on the repo, nor any post relating to it other than some Gitlab mirror repository issues, which turned out to be irrelevant. Since I am running this Gitea instance since 2022, I assumed something has changed in the recent updates that left my configuration broken. So, I spinned up a fresh Docker instance and investigated if there are any changes in app.ini , but turns out the issue came from the configuration file at /data/gitea/home/.gitconfig has changed at some point. Here is my old .gitconfig vs the new one.

[user]
	name = Gitea
	email = gitea@fake.local
[core]
	quotePath = false
	commitGraph = true
	logallrefupdates = true
[receive]
	advertisePushOptions = true
	procReceiveRefs = refs/for
	hideRefs = refs/pull/
[gc]
	writeCommitGraph = true
	reflogexpire = 90
[fetch]
	writeCommitGraph = true
[safe]
	directory = *
[diff]
	algorithm = histogram
[uploadpack]
	allowfilter = true
	allowAnySHA1InWant = true
[gpg]
	format = openpgp

/data/gitea/home/.gitconfig (Old)

[diff]
	algorithm = histogram
[core]
	logallrefupdates = true
	quotePath = false
	commitGraph = true
[gc]
	reflogexpire = 90
	writeCommitGraph = true
[user]
	name = Gitea
	email = gitea@fake.local
[receive]
	advertisePushOptions = true
	procReceiveRefs = refs/for
[fetch]
	writeCommitGraph = true
[safe]
	directory = *
[uploadpack]
	allowfilter = true
	allowAnySHA1InWant = true

/data/gitea/home/.gitconfig (v1.25.5)

See the line hideRefs = refs/pull/ under receive is no longer present in the new config. I have no idea if it was always there, but if anyone else happens to run into this issue on their own instance, I just deleted that line from my .gitconfig and now I can create pull requests again! Hope it helps!