mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-10 13:56:06 -05:00
[remote rejected] main -> main (pre-receive hook declined) #9718
Closed
opened 2025-11-02 08:47:29 -06:00 by GiteaMirror
·
14 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2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v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
issue/needs-feedback
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#9718
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dynabits on GitHub (Oct 21, 2022).
Description
Git push always fails with error:
Gitea Version
Gitea version 1.17.3+4-g19df07f02 built with GNU Make 4.1, go1.18.7 : bindata, sqlite, sqlite_unlock_notify
Git Version
2.37.3
Operating System
Arch Linux
How are you running Gitea?
Binary download, fresh install, no containers.
Database
SQLite
@lunny commented on GitHub (Oct 21, 2022):
You can enable RUN_MODE as dev and try again to take a look at what's the error.
@Dynabits commented on GitHub (Oct 21, 2022):
Output with RUN_MODE set to dev
@Dynabits commented on GitHub (Oct 21, 2022):
Ahh I see, looks like a post request is made with localost in the URL, that should be the IP address, not sure how to fix though.
@lunny commented on GitHub (Oct 21, 2022):
Because the host don't know what
localhostmeans. Your /etc/hosts should be checked.@Dynabits commented on GitHub (Oct 21, 2022):
I added this line to /etc/hosts
Works like a charm now, thank you so much @lunny
@codeex commented on GitHub (Oct 31, 2022):
on windows platform, it has the same error :Gitea: Internal Server Error
Unable to contact gitea: Post "http://localhost:3000/api/internal/hook/pre-receive/hhh/test": dial tcp: lookup localhost on 114.114.114.114:53: no such host.
I've modified C:\Windows\System32\drivers\etc\hosts, and added
127.0.0.1 localhost
but it has the same error, I don't know what I do again?
@lunny commented on GitHub (Oct 31, 2022):
It's a domain problem.
@jackzhum commented on GitHub (Nov 14, 2022):
I have the same problem. How can I solve it?
@jackzhum commented on GitHub (Nov 14, 2022):
I solved this problem: I will LOCAL_ ROOT_ The URL is changed to be the same as ROOT_ URL consistency.
@jinyangcruise commented on GitHub (Jan 8, 2023):
@jackzhum
I have the same problem. what is "LOCAL_ ROOT_ "? I can not find a LOCAL_ in my app.ini.
here is my my app.ini content:
@jackzhum commented on GitHub (Jan 16, 2023):
https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini

@zeripath commented on GitHub (Jan 16, 2023):
THOSE EXPERIENCING THIS ON WINDOWS IN 1.18 - YOU ARE EXPERIENCING A DUPLICATE OF #22370
Please see https://github.com/go-gitea/gitea/issues/22370#issuecomment-1384083726
DESCRIPTION
This bug is due to a change in Go's handling of the
netgobuild tag for Windows see:https://github.com/go-gitea/gitea/issues/22370#issuecomment-1378669025
We were bitten by this because we build our static precompiled binaries with
netgofor all platforms. (see https://github.com/go-gitea/gitea/issues/22370#issuecomment-1383936251)#22467 and #22468 should fix this for 1.18.1 and 1.19-dev.
WORKAROUND
For 1.18.0 set the
GODEBUG=netdns=cgoenvironment variable when running gitea and/or update your LOCAL_ROOT_URL to use an IP addresshttps://github.com/go-gitea/gitea/issues/22370#issuecomment-1383944400
Builds of what will become 1.18.1 are available now on https://dl.gitea.io/gitea/1.18
@gilbertoca commented on GitHub (Jan 27, 2023):
In our case, bringing our server from gitea-1.16.9-linux-amd64 to gitea-1.17.4-linux-amd64, we needed to remove that parameter:
#LOCAL_ROOT_URL = https://localhost:3000/Maybe is not just a windows problem? @zeripath
@zeripath commented on GitHub (Jan 27, 2023):
@gilbertoca on 1.18 this bug was one of a cluster of issues opened due to a change in the way Golang handles the build tag
netgoin Golang 1.18. This broke IP lookup of localhost.Whatever issue you were experiencing is different and if you're still experiencing you should consider opening a separate bug report with complete information about what your experience is. However, 1.17 is now out of support so you would need to show that your problem existed on 1.18 too. On 1.17 as was originally experienced this was due to missing alias for 127.0.0.1 in /etc/hosts.
The other thing to note - is that your problem was solved by doing the opposite to how this bug was worked around for others. That your solution requires the opposite says that the problem is likely a different thing.
In any case I'm going to lock this conversation - this bug is resolved and was a duplicate of #22730