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

push fail (pre-receive hook declined) #1685

Closed
2 of 7 tasks
ncwgf opened this issue May 5, 2017 · 8 comments · Fixed by #1689
Closed
2 of 7 tasks

push fail (pre-receive hook declined) #1685

ncwgf opened this issue May 5, 2017 · 8 comments · Fixed by #1689
Assignees
Labels
Milestone

Comments

@ncwgf
Copy link

ncwgf commented May 5, 2017

  • Gitea version (or commit ref): a503947 9a0b0da latest docker image
  • Git version:
  • Operating system:
  • 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 gist:

Description

when git push origin :refs/heads/feature/<xxx> (deleting branch), push fail
! [remote rejected] feature/<xxx> (pre-receive hook declined)
/data/gitea/log/hooks/pre-receive.log
[...io/gitea/cmd/hook.go:126 runHookPreReceive()] [F] retrieve protected branches information failed

seem only feature branch have this problem
develop branch work fine
guess related to branch name with /

rollback to image/version v1.1.1 will work

also change default branch and set protected branch is not work, even in v1.1.1, not sure is it same reason

@lunny lunny added this to the 1.2.0 milestone May 5, 2017
@lunny lunny added topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/bug and removed topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile labels May 5, 2017
@lunny lunny self-assigned this May 5, 2017
@SEQUOIIA
Copy link

SEQUOIIA commented May 5, 2017

Just ran into the same issue with a branch that also contains '/' in its name.

@silverwind
Copy link
Member

Also getting this, my target branch is just master.

@lunny
Copy link
Member

lunny commented May 8, 2017

@silverwind maybe your problem is not the same as this issue.

@silverwind
Copy link
Member

@lunny no, I guess it must've been the same issue as it works again as of 2bb8b3a, and I don't have any local branches containing a / either.

@davydov-vyacheslav
Copy link

davydov-vyacheslav commented Aug 28, 2017

After upgrading from 1.1.0 to 1.2.0-rc1 I start getting such errors. After Taking a look at pre-receive.log I found one interesting thing:
In the logs: [T] GetProtectedBranchBy: http://[domain]:7443/api/internal/branch/2/master
but actual thing is that I have apache reverse proxy (according to my home ASUS router settings), which make transforms this url to https://[domain]:39443/api/internal/branch/2/master ....

Is there a place in conf files where I can configure the link?

P.S.
My Server's conf is

[server]
PROTOCOL = http
DOMAIN = [domain]
ROOT_URL = https://[domain]:39443/
HTTP_ADDR = 0.0.0.0
HTTP_PORT = 7443
UNIX_SOCKET_PERMISSION = 666
LOCAL_ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
DISABLE_SSH = true
START_SSH_SERVER = false
OFFLINE_MODE = false
DISABLE_ROUTER_LOG = false

@davydov-vyacheslav
Copy link

Sorry for flood.. managed to fix it by set DOMAIN = localhost ... Not sure that this is correct way ... but it works

@lafriks
Copy link
Member

lafriks commented Aug 28, 2017

@davydov-vyacheslav it could also be fixed by changing LOCAL_ROOT_URL to http://localhost:7443/

@davydov-vyacheslav
Copy link

@lafriks , thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants