! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'http://thr-srv01:3000/I2T5/I2T5-ManualControl.git' #4745

Closed
opened 2025-11-02 06:01:33 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @AntoineBore on GitHub (Jan 28, 2020).

  • Gitea version (or commit ref): master 01/28/2020
  • Git version: git version 2.25.0.windows.1
  • Operating system: windows 10
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log list:
    " ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'http://thr-srv01:3000/I2T5/I2T5-ManualControl.git'"

Description

I tried to install gitea on a windows server. I have followed this tutorial . Unfortunatly, when I try to push, I have the error message above.
I saw that there is similar issues but I'm not able to solve mine, even after trying what people suggested.

The servers name is "thr-srv01". Here is my app.ini file:

APP_NAME = GiteaServer
RUN_USER = a.bore
RUN_MODE = prod

[oauth2]
JWT_SECRET = Gb2f5jVHzPTAeFSi3sPdoT7SZga2n4OtKKEvw1wDId8

[security]
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1NzkxODYwMDF9.JGzaAQznb3dikVku0WBjuqk1rETphJtmpMKyYtDe3-0
INSTALL_LOCK   = true
SECRET_KEY     = IcuYb88K2x3oIodUWYTyfCOoVVLMGD3WqKCpbCopTmW8DIaTeRyel4jQUFUEEZLn

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   = 
SSL_MODE = disable
CHARSET  = utf8
PATH     = C:\gitea\gitea.db

[repository]
ROOT = C:/Users/a.bore/gitea-repositories

[server]
SSH_DOMAIN       = localhost
DOMAIN           = localhost
HTTP_PORT        = 3000
ROOT_URL         = http://thr-srv01:3000/
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = C:/gitea/data/lfs
LFS_JWT_SECRET   = l_HV6b4SVReqKWQ0nCwC3VXvVCzObV_TBJEZJ7PPGSQ
OFFLINE_MODE     = false

[mailer]
ENABLED = false

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

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = true
ENABLE_OPENID_SIGNUP = true

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = info
ROOT_PATH = C:/gitea/log

...

Originally created by @AntoineBore on GitHub (Jan 28, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): master 01/28/2020 - Git version: git version 2.25.0.windows.1 - Operating system: windows 10 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log list: " ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'http://thr-srv01:3000/I2T5/I2T5-ManualControl.git'" ## Description I tried to install gitea on a windows server. I have followed this [tutorial ](https://adamtheautomator.com/gitea/). Unfortunatly, when I try to push, I have the error message above. I saw that there is similar issues but I'm not able to solve mine, even after trying what people suggested. The servers name is "thr-srv01". Here is my app.ini file: ``` APP_NAME = GiteaServer RUN_USER = a.bore RUN_MODE = prod [oauth2] JWT_SECRET = Gb2f5jVHzPTAeFSi3sPdoT7SZga2n4OtKKEvw1wDId8 [security] INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1NzkxODYwMDF9.JGzaAQznb3dikVku0WBjuqk1rETphJtmpMKyYtDe3-0 INSTALL_LOCK = true SECRET_KEY = IcuYb88K2x3oIodUWYTyfCOoVVLMGD3WqKCpbCopTmW8DIaTeRyel4jQUFUEEZLn [database] DB_TYPE = sqlite3 HOST = 127.0.0.1:3306 NAME = gitea USER = gitea PASSWD = SSL_MODE = disable CHARSET = utf8 PATH = C:\gitea\gitea.db [repository] ROOT = C:/Users/a.bore/gitea-repositories [server] SSH_DOMAIN = localhost DOMAIN = localhost HTTP_PORT = 3000 ROOT_URL = http://thr-srv01:3000/ DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = C:/gitea/data/lfs LFS_JWT_SECRET = l_HV6b4SVReqKWQ0nCwC3VXvVCzObV_TBJEZJ7PPGSQ OFFLINE_MODE = false [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = false ALLOW_ONLY_EXTERNAL_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = true DEFAULT_ENABLE_TIMETRACKING = true NO_REPLY_ADDRESS = noreply.localhost [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = true [openid] ENABLE_OPENID_SIGNIN = true ENABLE_OPENID_SIGNUP = true [session] PROVIDER = file [log] MODE = file LEVEL = info ROOT_PATH = C:/gitea/log ``` ...
GiteaMirror added the issue/stale label 2025-11-02 06:01:33 -06:00
Author
Owner

@lunny commented on GitHub (Jan 28, 2020):

Any error logs from your log file?

@lunny commented on GitHub (Jan 28, 2020): Any error logs from your log file?
Author
Owner

@bagasme commented on GitHub (Jan 28, 2020):

Or have you tried pull from your server first?

@bagasme commented on GitHub (Jan 28, 2020): Or have you tried pull from your server first?
Author
Owner

@AntoineBore commented on GitHub (Jan 28, 2020):

Here are the log files :
gitea.log
gitea.log.2020-01-28.001.gz

I cannot pull from the server as master doesn't exist yet on the server.

I tried to follow the exact same tutorial but on my computer and it works, so I don't understand why it doesn't on my server. Maybe it's just a hostname problem or root url problem ?

@AntoineBore commented on GitHub (Jan 28, 2020): Here are the log files : [gitea.log](https://github.com/go-gitea/gitea/files/4122261/gitea.log) [gitea.log.2020-01-28.001.gz](https://github.com/go-gitea/gitea/files/4122267/gitea.log.2020-01-28.001.gz) I cannot pull from the server as master doesn't exist yet on the server. I tried to follow the exact same tutorial but on my computer and it works, so I don't understand why it doesn't on my server. Maybe it's just a hostname problem or root url problem ?
Author
Owner

@AntoineBore commented on GitHub (Jan 28, 2020):

Also, another problem which I don't know if it's linked or not: when I try to create a repository from the web with the "Initialize the repository" option, I got an error 500. If I don't use this option, I can create a new repository without any error.

@AntoineBore commented on GitHub (Jan 28, 2020): Also, another problem which I don't know if it's linked or not: when I try to create a repository from the web with the "Initialize the repository" option, I got an error 500. If I don't use this option, I can create a new repository without any error.
Author
Owner

@AntoineBore commented on GitHub (Jan 30, 2020):

Do you have any idea of what could be wrong ? I'm not able to find a solution with the logs.
I have tried to resynchronize hooks as suggested in the issue #7284.
The git version on my server is 2.24.

@AntoineBore commented on GitHub (Jan 30, 2020): Do you have any idea of what could be wrong ? I'm not able to find a solution with the logs. I have tried to resynchronize hooks as suggested in the issue [#7284](https://github.com/go-gitea/gitea/issues/7284#issuecomment-521861685). The git version on my server is 2.24.
Author
Owner

@zeripath commented on GitHub (Jan 30, 2020):

Ok. Let's start from scratch.

What do you mean by push? Over http or SSH? Where from? The server or a client machine?

If this is over SSH I think others have had problems running openssh on windows and you may find things easier if you b use the internal SSH.

If this is during repository creation, are you trying to use the new push to create repository feature? Or is this from the UI?

I see you have localhost and thr-svr01 as names. Are you running Gitea behind IIS?

@zeripath commented on GitHub (Jan 30, 2020): Ok. Let's start from scratch. What do you mean by push? Over http or SSH? Where from? The server or a client machine? If this is over SSH I think others have had problems running openssh on windows and you may find things easier if you b use the internal SSH. If this is during repository creation, are you trying to use the new push to create repository feature? Or is this from the UI? I see you have localhost and thr-svr01 as names. Are you running Gitea behind IIS?
Author
Owner

@AntoineBore commented on GitHub (Jan 31, 2020):

I have tried different ways:

  • Gitkraken
  • SourceTree
  • Command:

git remote add origin http://thr-srv01:3000/I2T5/testrepo.git
git push -u origin master

I haven't tried over SSH.

Gitea is hosted on a windows server. I have tested to push from the server and from a client machine and I have the same result.

I have already created an empty repository on the gitea web application. I am trying to push the first commit which is just a README.md file.

I see you have localhost and thr-svr01 as names. Are you running Gitea behind IIS?
I have tested with different ROOT_URL so the app.ini might be wrong. I don't think I'm running Gitea behind IIS as there is no mention of this on the tutorial that I have followed.

@AntoineBore commented on GitHub (Jan 31, 2020): I have tried different ways: - Gitkraken - SourceTree - Command: > git remote add origin http://thr-srv01:3000/I2T5/testrepo.git > git push -u origin master I haven't tried over SSH. Gitea is hosted on a windows server. I have tested to push from the server and from a client machine and I have the same result. I have already created an empty repository on the gitea web application. I am trying to push the first commit which is just a README.md file. > I see you have localhost and thr-svr01 as names. Are you running Gitea behind IIS? I have tested with different ROOT_URL so the app.ini might be wrong. I don't think I'm running Gitea behind IIS as there is no mention of this on the tutorial that I have followed.
Author
Owner

@theAkito commented on GitHub (Jan 31, 2020):

@AntoineBore Not sure if this is related, but maybe it would be nice if you could confirm that what I experienced is not related to your issue:
https://discourse.gitea.io/t/reset-pre-receive-hooks/1865

@theAkito commented on GitHub (Jan 31, 2020): @AntoineBore Not sure if this is related, but maybe it would be nice if you could confirm that what I experienced is not related to your issue: https://discourse.gitea.io/t/reset-pre-receive-hooks/1865
Author
Owner

@stale[bot] commented on GitHub (Mar 31, 2020):

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 31, 2020): This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Apr 14, 2020):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Apr 14, 2020): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4745