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

**URL:** <https://forum.gitea.com/t/pre-receive-hook-declined-error-on-fresh-gitea-shared-hosting/78>\
**Category:** Install/Maintain/Configure\
**Created:** [September 14, 2017, 10:28pm UTC](https://forum.gitea.com/t/pre-receive-hook-declined-error-on-fresh-gitea-shared-hosting/78 "2017-09-14T22:28:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ko0](https://avatars.discourse-cdn.com/v4/letter/k/ecae2f/32.png) [@ko0](https://forum.gitea.com/u/ko0)\
**Post date:** [September 14, 2017, 10:28pm UTC](https://forum.gitea.com/t/pre-receive-hook-declined-error-on-fresh-gitea-shared-hosting/78/1 "2017-09-14T22:28:51Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [October 22, 2017, 2:41am UTC](https://forum.gitea.com/t/pre-receive-hook-declined-error-on-fresh-gitea-shared-hosting/78/2 "2017-10-22T02:41:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ko0](https://avatars.discourse-cdn.com/v4/letter/k/ecae2f/32.png) [@ko0](https://forum.gitea.com/u/ko0)\
**Post date:** [November 1, 2017, 6:52pm UTC](https://forum.gitea.com/t/pre-receive-hook-declined-error-on-fresh-gitea-shared-hosting/78/3 "2017-11-01T18:52:11Z")

</div>

Hello lunny,

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