-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
git push.(pre-receive hook declined) error: failed to push some refs to "xxx"] #22293
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
Comments
Hi I had the same thing Went to Site Administration hope this helps |
Same problem on windows7. Same version 1.18.0, but v1.18.0 on linux x86_64 is ok. Logs when the (pre-receive hook declined) error occurred
|
Cannot fix this, fallback to v1.17.4. |
@sinotaotao are you able to try with gogit version of the windows binary? |
Seeing:
in the logs is normal and the fact that you get to a pre-receive hook declined implies that you have been able to successfully authenticate. The error will be in the pre-receive hook communicating with the gitea server or there should be something logged in the server logs regarding the pre-receive hook. |
Therefore please upload a more complete set of logs. |
I got this error after reinstalling an existing sqlite3 database and version 1.8.0 from scratch. |
I can't push at all. Clone and pull operations are working.
|
I don't understand why I repeatedly have to say this: WE NEED LOGS Look at: https://docs.gitea.io/en-us/logging-configuration/#debugging-problems Give us ALL the logs around the push that fails not just the logs that you think are relevant. I know that there will be some relevant logging after the |
@emehmet that LOCAL_ROOT_URL is not an URL and could never work. From your app.ini it should be: [server]
...
LOCAL_ROOT_URL = http://127.0.0.1:1881/
... |
Hey @zeripath , I see this logs on client ;
And I see this logs on server;
But after doing what was said in the comment here it worked. And here's the log of the code that worked:
|
I had installed from scratch and localhost was written there. It was fixed by typing 127.0.0.1:1881 in app.ini. |
@emehmet whilst I'm glad you uploaded more logs - you still didn't give us debug logs. Why didn't you change your In any case it appears that setting the LOCAL_ROOT_URL as I suggested above works. That means at least for you this is a duplicate of the problem in #22370. I still don't understand why this has occurred - as far as I can see we have made no changes to the dialer there. |
Hey @zeripath,
|
@DuaneDu set your LOCAL_ROOT_URL as described above. These problems have the same root cause and are all duplicates of each other. |
Duplicate of #22370. Users affected should set LOCAL_ROOT_URL as their hosts file most likely doesn't contain a valid alias for localhost. I don't understand why go has suddenly broke this but it's not our fault - we'll investigate more in the other issue. |
Description
when git push.
(pre-receive hook declined) error: failed to push some refs to "xxx"]
but the gitea console error msg:
401 Unauthorized in 3.4ms @ repo/http.go:532(repo.GetInfoRefs).
use gitea 1.17.3 no problem!
Gitea Version
1.18.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
repo/http.go
Screenshots
http.go
line 532
h := httpBase(ctx)
then line 159
if !ctx.IsSigned {
// TODO: support digit auth - which would be Authorization header with digit
ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm="."")
ctx.Error(http.StatusUnauthorized)
return
}
Git Version
2.38.1
Operating System
windows
How are you running Gitea?
gitea.exe web
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: