Skip to content

Opening a PR leads to 500 status - due to lfs hooks #16372

Closed
@DHentzschel

Description

@DHentzschel
  • Gitea version (or commit ref): 1.14.4
  • Git version: 2.20.1
  • Operating system: Raspberry Pi OS Debian buster
  • Binaries: from the official release page on GitHub
  • How I run gitea: via systemd
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist: related output

Description

When trying to open a PR from develop to master branch in a private, simple and small repo, Gitea returns 500.
After enabling debug and trace mode and retrying the same step, gitea's frontend prints the following message:

Push: <org>/<repo>:develop <org>/<repo>:refs/pull/18/head exit status 1 - Invalid remote name "/<path>/<to>/<org>/<repo>.git": Invalid remote name: "/<path>/<to>/<org>/<repo>.git" error: failed to push some refs to '/<path>/<to>/<org>/<repo>.git'

When calling the defective PR, a message appears This pull request is broken due to missing fork information.

I've run the following tasks trying to fix it the issue:

  • Resynchronize pre-receive, update and post-receive hooks of all repositories.
  • Reinitialize all missing Git repositories for which records exist

There actually were no manual steps I did to modify the repo.

Edit (16 July 2021)
So, reproduced the issue and checked the logs in dev mode and with log level trace.

The following logs have been written:
Note: User, organisation, repo names and repo directory have been exchanged by myuser, myorganisation/myrepo and /path/to/repos

Frontend

Push: myorganisation/myrepo:develop myorganisation/myrepo:refs/pull/25/head exit status 1 - Invalid remote name
"/path/to/repos/myorganisation/myrepo.git": Invalid remote name: "/path/to/repos/myorganisation/myrepo.git"
error: failed to push some refs to '/path/to/repos/myorganisation/myrepo.git'

Backend
See gitea.log

Edit 2 (16 July 2021)
The project exists and is a git repo.

After using the config parameters from the comments the following got printed to the console:
console.log
The only thing I've sanitized are organisation name, repo name and IP address (CSFR token also)

I've preserved its integrity.

By the way, after getting this error, a new pull request will be created and displayed like this:
frontend_n-a
I can only create a new PR for both branches develop -> master when the defect one is closed.

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions