"pre-receive hook declined"-Error on fresh Gitea (Shared Hosting)

Hello community,

I’m new in the gitea world. Today I setup my first instance. I want a place for my private repos. I setup the instance on a uberspace.de account. Its an sharedhoster which allowes nearly everything you can imaging.

It looks all good, but when I try to push, i recieve the error code “pre-receive hook declined”. I tested a couple of clients. Still same problem. I also resync the hooks via the admin interface. Still the problem.

Only one solution work: When I disable the pre-receive hook by myself the badway by renaming/disabling the file '/home/i1l/gitea-repositories/basteyy/testrepo.git/hooks/pre-receive'. This file only wrap to another which perform the following command: '/home/i1l/gitea-repositories/basteyy/testrepo.git/hooks/pre-receive.d/gitea' with the following content:

#!/usr/bin/env bash
"/home/i1l/src/go/src/code.gitea.io/gitea/gitea" hook --config='/home/i1l/src/go/src/code.gitea.io/gitea/custom/conf/app.ini' pre-receive

This is the config-file:

APP_NAME = Gitea
RUN_USER = i1l
RUN_MODE = prod

[security]
INTERNAL_TOKEN = 123
INSTALL_LOCK   = true
SECRET_KEY     = 123

[database]
DB_TYPE  = mysql
HOST     = 127.0.0.1:3306
NAME     = i1l_123
USER     = i1l
PASSWD   = 123
SSL_MODE = disable
PATH     = data/gitea.db

[repository]
ROOT = /home/i1l/gitea-repositories

[server]
SSH_DOMAIN       = git.domain.de
DOMAIN           = git.domain.de
HTTP_PORT        = 443
ROOT_URL         = https://git.domain.de/
DISABLE_SSH      = true
SSH_PORT         = 22
LFS_START_SERVER = false
OFFLINE_MODE     = false

[mailer]
ENABLED = true
HOST    = domain:587
FROM    = "Gitea" <mail@domain-domain.de>
USER    = domain@domain-domain.de
PASSWD  = 123

[service]
REGISTER_EMAIL_CONFIRM            = true
ENABLE_NOTIFY_MAIL                = true
DISABLE_REGISTRATION              = true
ENABLE_CAPTCHA                    = true
REQUIRE_SIGNIN_VIEW               = true
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = true
DEFAULT_ENABLE_TIMETRACKING       = true
NO_REPLY_ADDRESS                  = noreply.example.org

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = false

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = /home/i1l/src/go/src/code.gitea.io/gitea/log

The software on the remote:
Gitea Version: 1.2.0-dev, Go: 1.7.6 and Git 2.7.4

On the local side I use Git 2.14

Does anyone have a idea?

maybe because your executable binary has been moved to a new place. You can rewrite hooks file on Admin Panel on Gitea UI.

Hello lunny,

thank you for your answer. I already tried this. Still same error.