Codeberg/Community
54
324
Fork
You've already forked Community
12

git push (AGit): Internal Server Error (no message for end users) #2283

Open
opened 2026年01月02日 14:09:35 +01:00 by laumann · 8 comments

Comment

I get this result when running the following command (to create a PR via AGit):

$ git push codeberg HEAD:refs/for/master -o topic="eclean-pkgdir-var"
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 4 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.23 KiB | 1.23 MiB/s, done.
Total 6 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Forgejo: Internal Server Error (no message for end users)
remote: error: proc-receive exited abnormally
To ssh://codeberg.org/gentoo/gentoolkit.git
 ! [remote rejected] HEAD -> refs/for/master (fail to run proc-receive hook)
error: failed to push some refs to 'ssh://codeberg.org/gentoo/gentoolkit.git'

It fails the same way every time. The remote is configured like this:

$ git remote -v
codeberg	ssh://git@codeberg.org/gentoo/gentoolkit.git (fetch)
codeberg	ssh://git@codeberg.org/gentoo/gentoolkit.git (push)
...

I also tried forking the repository (gentoo/gentoolkit) and open a PR the "traditional" way. I get this error message when going to the cli-provided URL to open a PR (https://codeberg.org/gentoo/gentoolkit/compare/main...laumann:eclean-pkgdir-var):

image

Additionally, I get the same 404 page when I try to create a PR in the forked repository!

I tried looking for similar issues, but didn't find anything that looked like this.

The listed Forgejo version: 13.0.0-dev-658-b96b5f65

### Comment I get this result when running the following command (to create a PR via AGit): ``` $ git push codeberg HEAD:refs/for/master -o topic="eclean-pkgdir-var" Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 4 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 1.23 KiB | 1.23 MiB/s, done. Total 6 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0) remote: Forgejo: Internal Server Error (no message for end users) remote: error: proc-receive exited abnormally To ssh://codeberg.org/gentoo/gentoolkit.git ! [remote rejected] HEAD -> refs/for/master (fail to run proc-receive hook) error: failed to push some refs to 'ssh://codeberg.org/gentoo/gentoolkit.git' ``` It fails the same way every time. The remote is configured like this: ``` $ git remote -v codeberg ssh://git@codeberg.org/gentoo/gentoolkit.git (fetch) codeberg ssh://git@codeberg.org/gentoo/gentoolkit.git (push) ... ``` I also tried forking the repository (gentoo/gentoolkit) and open a PR the "traditional" way. I get this error message when going to the cli-provided URL to open a PR (https://codeberg.org/gentoo/gentoolkit/compare/main...laumann:eclean-pkgdir-var): ![image](/attachments/4fbce5b3-b210-496d-9446-9554b31accfe) Additionally, I get the same 404 page when I try to create a PR in the forked repository! I tried looking for similar issues, but didn't find anything that looked like this. The listed Forgejo version: 13.0.0-dev-658-b96b5f65

it's git@HOST:USER/REPO, not git@HOST/USER/REPO

it's `git@HOST:USER/REPO`, not `git@HOST/USER/REPO`
Author
Copy link

yes, when it's git@... I agree, but the clone URLs I see here on code use the ssh://git@... prefix and slashes (no colon).

EDIT: the previous comment did inspire me to try with https://codeberg.org/gentoo/gentoolkit and git@codeberg.org:gentoo/gentoolkit, both of which reproduce the same error.

yes, when it's `git@...` I agree, but the clone URLs I see here on code use the `ssh://git@...` prefix and slashes (no colon). EDIT: the previous comment did inspire me to try with `https://codeberg.org/gentoo/gentoolkit` and `git@codeberg.org:gentoo/gentoolkit`, both of which reproduce the same error.

Forgejo attempts to open a PR targeting main instead of master:

https://codeberg.org/gentoo/gentoolkit/compare/master...laumann:eclean-pkgdir-var should work

Edit: Only for the "traditional PR flow". The AGit flow correctly targets master, so there is something else going wrong. Maybe a Codeberg admin can retrieve the log (please make a new attempt a record the date+time of the error)

Forgejo attempts to open a PR targeting `main` instead of `master`: https://codeberg.org/gentoo/gentoolkit/compare/master...laumann:eclean-pkgdir-var should work Edit: Only for the "traditional PR flow". The AGit flow correctly targets master, so there is something else going wrong. Maybe a Codeberg admin can retrieve the log (please make a new attempt a record the date+time of the error)
Author
Copy link

@oliverpool wrote in #2283 (comment):

Forgejo attempts to open a PR targeting main instead of master:

You're right, the default branch was set to main but it should've been master. Not sure how I missed that, I've stared at that URL quite a bit 😅

https://codeberg.org/gentoo/gentoolkit/compare/master...laumann:eclean-pkgdir-var should work

It works!

Edit: Only for the "traditional PR flow". The AGit flow correctly targets master, so there is something else going wrong. Maybe a Codeberg admin can retrieve the log (please make a new attempt a record the date+time of the error)

Will do!

@oliverpool wrote in https://codeberg.org/Codeberg/Community/issues/2283#issuecomment-9491381: > Forgejo attempts to open a PR targeting `main` instead of `master`: You're right, the default branch was set to `main` but it should've been `master`. Not sure how I missed that, I've stared at that URL quite a bit 😅 > https://codeberg.org/gentoo/gentoolkit/compare/master...laumann:eclean-pkgdir-var should work It works! > Edit: Only for the "traditional PR flow". The AGit flow correctly targets master, so there is something else going wrong. Maybe a Codeberg admin can retrieve the log (please make a new attempt a record the date+time of the error) Will do!
Author
Copy link

@oliverpool I think the AGit flow targets the default branch - we just got the default branch on gentoo/gentoolkit changed from main to master, and now the AGit push worked: gentoo/gentoolkit#1

@oliverpool I think the AGit flow targets the default branch - we just got the default branch on gentoo/gentoolkit changed from main to master, and now the AGit push worked: https://codeberg.org/gentoo/gentoolkit/pulls/1
Author
Copy link

I think we can consider this issue resolved, but I think the error message could be improved somewhat. Aside from the URL showing a non-existing branch (main, not master). I didn't notice any warnings that the default branch was set to an invalid value (that's not to say there might have been some that I missed).

Could/Should I file a feature request somewhere? Would it be forgejo/forgejo, or maybe Codeberg-Infrastructure/forgejo?

I think we can consider this issue resolved, but I think the error message could be improved somewhat. Aside from the URL showing a non-existing branch (main, not master). I didn't notice any warnings that the default branch was set to an invalid value (that's not to say there might have been some that I missed). Could/Should I file a feature request somewhere? Would it be forgejo/forgejo, or maybe Codeberg-Infrastructure/forgejo?

Great that this issue is resolved! Feel free to close this issue while we try to get to the root-cause.


There are a couple of safeguards in Forgejo to prevent deleting the default branch (or setting the default branch to a non-existing one), so I can't reproduce your bug at all.

Do you know how the gentoolkit repo was set up? Was it created here, migrated from somewhere else?

Once we can reproduce this bug, we can open an issue in forgejo/forgejo

Great that this issue is resolved! Feel free to close this issue while we try to get to the root-cause. --- There are a couple of safeguards in Forgejo to prevent deleting the default branch (or setting the default branch to a non-existing one), so I can't reproduce your bug at all. Do you know how the gentoolkit repo was set up? Was it created here, migrated from somewhere else? Once we can reproduce this bug, we can open an issue in [forgejo/forgejo](https://codeberg.org/forgejo/forgejo/issues/new/choose)
Author
Copy link

Great, thanks! @thesamesam can you elaborate on how the gentoo/gentoolkit was created?

Now that the gentoolkit repo is fixed, I don't suppose we can set the default branch back to the non-existing main? Maybe we could reproduce with one of the other gentoo git repos if it's created in the same way?

Great, thanks! @thesamesam can you elaborate on how the gentoo/gentoolkit was created? Now that the gentoolkit repo is fixed, I don't suppose we can set the default branch back to the non-existing `main`? Maybe we could reproduce with one of the other gentoo git repos if it's created in the same way?
Sign in to join this conversation.
No Branch/Tag specified
main
No results found.
Labels
Clear labels
accessibility

Reduces accessibility and is thus a "bug" for certain user groups on Codeberg.
bug

Something is not working the way it should. Does not concern outages.
bug
infrastructure

Errors evidently caused by infrastructure malfunctions or outages
Codeberg

This issue involves Codeberg's downstream modifications and settings and/or Codeberg's structures.
contributions welcome

Please join the discussion and consider contributing a PR!
docs

No bug, but an improvement to the docs or UI description will help
duplicate

This issue or pull request already exists
enhancement

New feature
infrastructure

Involves changes to the server setups, use `bug/infrastructure` for infrastructure-related user errors.
legal

An issue directly involving legal compliance
licence / ToS

involving questions about the ToS, especially licencing compliance
please chill
we are volunteers

Please consider editing your posts and remember that there is a human on the other side. We get that you are frustrated, but it's harder for us to help you this way.
public relations

Things related to Codeberg's external communication
question

More information is needed
question
user support

This issue contains a clearly stated problem. However, it is not clear whether we have to fix anything on Codeberg's end, but we're helping them fix it and/or find the cause.
s/Forgejo

Related to Forgejo. Please also check Forgejo's issue tracker.
s/Forgejo/migration

Migration related issues in Forgejo
s/Pages

Issues related to the Codeberg Pages feature
s/Weblate

Issue is related to the Weblate instance at https://translate.codeberg.org
s/Woodpecker

Woodpecker CI related issue
security

involves improvements to the sites security
service

Add a new service to the Codeberg ecosystem (instead of implementing into Gitea)
upstream

An open issue or pull request to an upstream repository to fix this issue (partially or completely) exists (i.e. Gitea, Forgejo, etc.)
wontfix

Codeberg's current set of contributors are not planning to spend time on delegating this issue.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/Community#2283
Reference in a new issue
Codeberg/Community
No description provided.
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?