Merge Pull Request 500 error #3684

Closed
opened 2025-11-02 05:21:39 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @xlouc on GitHub (Jul 26, 2019).

  • Gitea version (or commit ref): 1.9.0-rc2
  • Git version: 1.8.3.1
  • Operating system: CentOS 7
  • 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:
2019/07/27 03:17:19 ...ters/private/hook.go:74:HookPreReceive() [E] Unable to detect force push between: 50c1b4fd7cba3172b4b0a72386708cf5a66a55eb and 8f9a3d87fbee0a03a94230aebd4b3c5fffd09b24 in 824741413200:yakcode/yak-ui Error: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git

2019/07/27 03:17:19 routers/repo/pull.go:629:MergePullRequest() [E] Merge: git push: From /home/git/gitea/repositories/yakcode/yak-ui
         * [new branch]      develop    -> head_repo/develop
         * [new branch]      gh-pages   -> head_repo/gh-pages
         * [new branch]      master     -> head_repo/master
        Automatic merge went well; stopped before committing as requested
        remote: Gitea: Internal Server Error
        remote: Fail to detect force push: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git
        remote:
        To /home/git/gitea/repositories/yakcode/yak-ui.git
         ! [remote rejected] master -> master (pre-receive hook declined)
        error: failed to push some refs to '/home/git/gitea/repositories/yakcode/yak-ui.git'

Description

...

Screenshots

微信截图_20190727032358

Originally created by @xlouc on GitHub (Jul 26, 2019). <!-- 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): 1.9.0-rc2 - Git version: 1.8.3.1 - Operating system: CentOS 7 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ``` 2019/07/27 03:17:19 ...ters/private/hook.go:74:HookPreReceive() [E] Unable to detect force push between: 50c1b4fd7cba3172b4b0a72386708cf5a66a55eb and 8f9a3d87fbee0a03a94230aebd4b3c5fffd09b24 in 824741413200:yakcode/yak-ui Error: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git 2019/07/27 03:17:19 routers/repo/pull.go:629:MergePullRequest() [E] Merge: git push: From /home/git/gitea/repositories/yakcode/yak-ui * [new branch] develop -> head_repo/develop * [new branch] gh-pages -> head_repo/gh-pages * [new branch] master -> head_repo/master Automatic merge went well; stopped before committing as requested remote: Gitea: Internal Server Error remote: Fail to detect force push: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git remote: To /home/git/gitea/repositories/yakcode/yak-ui.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '/home/git/gitea/repositories/yakcode/yak-ui.git' ``` ## Description ... ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> ![微信截图_20190727032358](https://user-images.githubusercontent.com/12823830/61976297-04f23380-b01e-11e9-9f5c-1b20c3b17b14.png)
GiteaMirror added the issue/duplicate label 2025-11-02 05:21:39 -06:00
Author
Owner

@xlouc commented on GitHub (Jul 26, 2019):

Errors occur only when branch protection is set
微信截图_20190727032358

@xlouc commented on GitHub (Jul 26, 2019): Errors occur only when branch protection is set ![微信截图_20190727032358](https://user-images.githubusercontent.com/12823830/61976502-84800280-b01e-11e9-8963-4b8e8a5faf86.png)
Author
Owner

@zeripath commented on GitHub (Jul 26, 2019):

Hi! thanks for your report. I'm suspicious that this is a duplicate of #7611, which has been fixed in master with #7615 and 1.9 with #7618.

@zeripath commented on GitHub (Jul 26, 2019): Hi! thanks for your report. I'm suspicious that this is a duplicate of #7611, which has been fixed in master with #7615 and 1.9 with #7618.
Author
Owner

@lunny commented on GitHub (Aug 6, 2019):

The git version 1.8.3.1 is too low. Maybe it's related.

@lunny commented on GitHub (Aug 6, 2019): The git version 1.8.3.1 is too low. Maybe it's related.
Author
Owner

@lafriks commented on GitHub (Aug 6, 2019):

I think this is duplicate of #7754

@lafriks commented on GitHub (Aug 6, 2019): I think this is duplicate of #7754
Author
Owner

@lunny commented on GitHub (Aug 6, 2019):

It should be.

@lunny commented on GitHub (Aug 6, 2019): It should be.
Author
Owner

@axeloz commented on GitHub (Aug 8, 2019):

Hello, I'm using Gitea 1.9.0 and I have the exact same issue.
Trying to merge a pull request from "develop" to "master". Master branch is protected but I'm into the whitelist for merges.

Error message:

2019/08/08 14:15:15 routers/repo/pull.go:629:MergePullRequest() [E] Merge: git push: From /home/git/repositories/xxxxxxxxx/webservices
         * branch            develop    -> FETCH_HEAD
         * [new branch]      develop    -> head_repo/develop
        Automatic merge went well; stopped before committing as requested
        remote: Gitea: Internal Server Error
        remote: Fail to detect force push: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git
        remote:
        To /home/git/repositories/xxxxxxxxx/webservices.git
         ! [remote rejected] master -> master (pre-receive hook declined)
        error: failed to push some refs to '/home/git/repositories/xxxxxxxxx/webservices.git'

Thanks

@axeloz commented on GitHub (Aug 8, 2019): Hello, I'm using Gitea 1.9.0 and I have the exact same issue. Trying to merge a pull request from "develop" to "master". Master branch is protected but I'm into the whitelist for merges. Error message: ``` 2019/08/08 14:15:15 routers/repo/pull.go:629:MergePullRequest() [E] Merge: git push: From /home/git/repositories/xxxxxxxxx/webservices * branch develop -> FETCH_HEAD * [new branch] develop -> head_repo/develop Automatic merge went well; stopped before committing as requested remote: Gitea: Internal Server Error remote: Fail to detect force push: exit status 128 - fatal: Not a git repository (or any of the parent directories): .git remote: To /home/git/repositories/xxxxxxxxx/webservices.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '/home/git/repositories/xxxxxxxxx/webservices.git' ``` Thanks
Author
Owner

@lunny commented on GitHub (Aug 8, 2019):

See #7754 and #7775

@lunny commented on GitHub (Aug 8, 2019): See #7754 and #7775
Author
Owner

@axeloz commented on GitHub (Aug 9, 2019):

thanks @lunny, so we must wait for the #7775 fix to be merged if I understand right

@axeloz commented on GitHub (Aug 9, 2019): thanks @lunny, so we must wait for the #7775 fix to be merged if I understand right
Author
Owner

@joseluisq commented on GitHub (Aug 30, 2019):

I'm facing the same issue for latest Gitea v1.10.0+dev-232-gf1c414882 with Postgres.
Waiting for #7775.

@joseluisq commented on GitHub (Aug 30, 2019): I'm facing the same issue for latest Gitea `v1.10.0+dev-232-gf1c414882` with Postgres. Waiting for #7775.
Author
Owner

@lucastucious commented on GitHub (Aug 5, 2020):

Same issue with gitea v1.11.1

@lucastucious commented on GitHub (Aug 5, 2020): Same issue with gitea v1.11.1
Author
Owner

@zeripath commented on GitHub (Aug 5, 2020):

@lucastucious it will not be the same issue.

Please update to 1.12 and open a new issue with logs and more detail

@zeripath commented on GitHub (Aug 5, 2020): @lucastucious it will not be the same issue. Please update to 1.12 and open a new issue with logs and more detail
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3684