Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 7 tasks
AntoineBore opened this issue Jan 28, 2020 · 10 comments

Comments

@AntoineBore
Copy link

AntoineBore commented 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

...

@lunny
Copy link
Member

lunny commented Jan 28, 2020

Any error logs from your log file?

@bagasme
Copy link
Contributor

bagasme commented Jan 28, 2020

Or have you tried pull from your server first?

@AntoineBore
Copy link
Author

AntoineBore commented 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
Copy link
Author

AntoineBore commented 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
Copy link
Author

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.

@zeripath
Copy link
Contributor

zeripath commented 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?

@AntoineBore
Copy link
Author

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.

@theAkito
Copy link

@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

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Mar 31, 2020
@stale
Copy link

stale bot commented Apr 14, 2020

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

@stale stale bot closed this as completed Apr 14, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants