CleanUpMigrateInfo: exit status 2 - error: No such remote: 'origin' #13845

Closed
opened 2025-11-02 10:54:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @YowFung on GitHub (Dec 18, 2024).

Description

When I try to convert a mirrored repository to a normal repository, a 500 page error occurs.

Gitea Version

1.22.6

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

image

Git Version

2.45.2

Operating System

Linux (Docker)

How are you running Gitea?

Docker

Database

MySQL/MariaDB

Originally created by @YowFung on GitHub (Dec 18, 2024). ### Description When I try to convert a mirrored repository to a normal repository, a 500 page error occurs. ### Gitea Version 1.22.6 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots ![image](https://github.com/user-attachments/assets/51c1c41c-1d24-47df-a9ed-cf5369408af0) ![image](https://github.com/user-attachments/assets/bbff49ae-75c9-4612-ab42-54011de4acd7) ### Git Version 2.45.2 ### Operating System Linux (Docker) ### How are you running Gitea? Docker ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:54:55 -06:00
Author
Owner

@lunny commented on GitHub (Dec 20, 2024):

I cannot reproduce this both in main and release/v1.22

@lunny commented on GitHub (Dec 20, 2024): I cannot reproduce this both in main and release/v1.22
Author
Owner

@yp05327 commented on GitHub (Jan 6, 2025):

I think this is partly caused by git itself, because I have no idea why your origin remote is missing, for this, maybe you need to provide more information to help us figure out the reason.


Why it is partly caused by git itself:

First, in Gitea, for all git remote xx related command, No such remote will be skipped as expected:
image
And at least for CleanUpMigrateInfo, it is from a commit about 6 years ago:
https://github.com/go-gitea/gitea/pull/6593/files

But git has changed the exit code for git remote xx command about 4 years ago: 9144ba4cf5
So exit status 128 is no longer correct any more, it is 2 now.

And as this change has been merged in git v2.30.0, I think if you downgrade your git version, you may not see this 500 error.
https://github.com/git/git/compare/v2.29.0...v2.30.0

@yp05327 commented on GitHub (Jan 6, 2025): I think this is **partly** caused by git itself, because I have no idea why your `origin` remote is missing, for this, maybe you need to provide more information to help us figure out the reason. ------------------------------- Why it is **partly** caused by git itself: First, in Gitea, for all `git remote xx` related command, `No such remote` will be skipped as expected: ![image](https://github.com/user-attachments/assets/9279e07a-14c7-4946-b978-9af3e0a9f329) And at least for `CleanUpMigrateInfo`, it is from a commit about 6 years ago: https://github.com/go-gitea/gitea/pull/6593/files But git has changed the exit code for `git remote xx` command about 4 years ago: https://github.com/git/git/commit/9144ba4cf52bb0e891d7c10a331fc32c1d3e8f64 So `exit status 128` is no longer correct any more, it is `2` now. And as this change has been merged in git v2.30.0, I think if you downgrade your git version, you may not see this 500 error. https://github.com/git/git/compare/v2.29.0...v2.30.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13845