gitea: A Push ends in: ! [remote rejected] lab -> lab (pre-receive hook declined)

  • Gitea version (or commit ref): 1.3.2
  • Git version: 2.11.0
  • Operating system: Debian Stretch (9.3)
  • Database (use [x]):
    • PostgreSQL
    • MySQL (MariaDB, actually)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: […io/gitea/cmd/hook.go:115 runHookPreReceive()] [F] retrieve protected branches information failed

Description

I have seen similar issues, but the solutions to those are not fixing the current issue. Example: https://github.com/go-gitea/gitea/issues/1685.

What’s strange is that it will fail and the logs will show the above. However, if I restart the gitea service, a push happens correctly, as expected. This will be fine for a while, but somewhere after about 10 minutes or so, I would have to restart the service again to be able to push changes to my repos. This is affecting all of my repos. As I find more information, I’ll be glad to post details here. Do you have any suggestions what may be causing this?

I’ve attached my config file for review (private info redacted). This config worked well with versions in the 1.2 branches.

app.ini.txt

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (7 by maintainers)

Most upvoted comments

@minoru7 that means your config LOCAL_ROOT_URL is not corrected.

; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service.
; In most cases you do not need to change the default value.
; Alter it only if your SSH server node is not the same as HTTP node.
LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/