Request for Assistance in Resolving Gitea Repository Migration Issue #13454

Closed
opened 2025-11-02 10:42:51 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @roninli on GitHub (Sep 4, 2024).

Description

I’m experiencing an issue while attempting to migrate a repository from http://10.55.67.33:8930/dytest/cktest1.git using Gitea. The error message I’m receiving is “Malformed version:”. This indicates that Gitea is having difficulty interpreting the version information from the provided repository. Any assistance in resolving this issue would be greatly appreciated.
image

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

it is being run from docker

Database

MySQL/MariaDB

Originally created by @roninli on GitHub (Sep 4, 2024). ### Description I’m experiencing an issue while attempting to migrate a repository from http://10.55.67.33:8930/dytest/cktest1.git using Gitea. The error message I’m receiving is “Malformed version:”. This indicates that Gitea is having difficulty interpreting the version information from the provided repository. Any assistance in resolving this issue would be greatly appreciated. ![image](https://github.com/user-attachments/assets/c35ac835-d2a0-45bb-8587-5da5a26036fd) ### Gitea Version 1.20.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots <img width="1177" alt="image" src="https://github.com/user-attachments/assets/6d23f850-11eb-41bf-84ad-bb38d9b0fc7f"> ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? it is being run from docker ### Database MySQL/MariaDB
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:42:51 -06:00
Author
Owner

@kemzeb commented on GitHub (Sep 4, 2024):

What type of Git hosting service does your URL point to? From looking at your logs and digging deep into the migration-related code, it appears that you are trying to migrate a repository from some other Gitea instance on your network to your Gitea instance?

It this is the case, what seems to be happening is your instance tries to create a "downloader" client to the other instance. It then tries to fetch the version of the other instance and for some reason it returns an empty string.

@kemzeb commented on GitHub (Sep 4, 2024): What type of Git hosting service does your URL point to? From looking at your logs and digging deep into the [migration-related code](https://github.com/go-gitea/gitea/blob/74b1c589c6c1a4261556e1a1a868bbcb2964a5d3/services/migrations/gitea_downloader.go#L92), it appears that you are trying to migrate a repository from some other Gitea instance on your network to your Gitea instance? It this is the case, what seems to be happening is your instance tries to create a "downloader" client to the other instance. It then tries to [fetch the version ](https://gitea.com/gitea/go-sdk/src/commit/8b855b4a5b33bc2050143edc4044ee330bf09b05/gitea/client.go#L76)of the other instance and for some reason it returns an empty string.
Author
Owner

@roninli commented on GitHub (Sep 5, 2024):

What type of Git hosting service does your URL point to? From looking at your logs and digging deep into the migration-related code, it appears that you are trying to migrate a repository from some other Gitea instance on your network to your Gitea instance?

It this is the case, what seems to be happening is your instance tries to create a "downloader" client to the other instance. It then tries to fetch the version of the other instance and for some reason it returns an empty string.

I am using a local Gitea instance. When I run the command gitea --version, it shows that the Gitea version is empty. I’m not sure how to configure it to display the correct version. Could you please advise on how to resolve this issue?
image

@roninli commented on GitHub (Sep 5, 2024): > What type of Git hosting service does your URL point to? From looking at your logs and digging deep into the [migration-related code](https://github.com/go-gitea/gitea/blob/74b1c589c6c1a4261556e1a1a868bbcb2964a5d3/services/migrations/gitea_downloader.go#L92), it appears that you are trying to migrate a repository from some other Gitea instance on your network to your Gitea instance? > > It this is the case, what seems to be happening is your instance tries to create a "downloader" client to the other instance. It then tries to [fetch the version ](https://gitea.com/gitea/go-sdk/src/commit/8b855b4a5b33bc2050143edc4044ee330bf09b05/gitea/client.go#L76)of the other instance and for some reason it returns an empty string. I am using a local Gitea instance. When I run the command gitea --version, it shows that the Gitea version is empty. I’m not sure how to configure it to display the correct version. Could you please advise on how to resolve this issue? <img width="1186" alt="image" src="https://github.com/user-attachments/assets/55f5f55c-6ed5-4cdf-855e-fa78f8bdcea3">
Author
Owner

@kemzeb commented on GitHub (Sep 5, 2024):

So assuming you have two Gitea instances now and the one we are talking about is the one your URL points to, how was the Gitea binary built? If it was with Docker, did you use an official release or one that was custom-made?

From what I can see reading the source code, the version is set at build time and you would need to pass it as a flag (in our Makefile, they are passed by using go build's -ldflags option).

@kemzeb commented on GitHub (Sep 5, 2024): So assuming you have two Gitea instances now and the one we are talking about is the one your URL points to, how was the Gitea binary built? If it was with Docker, did you use an official release or one that was custom-made? From what I can see reading the source code, the [version](https://github.com/go-gitea/gitea/blob/19af5344623ba999f418520fad1a3bde77980561/main.go#L29) is set at **build time** and you would need to pass it as a flag (in our [Makefile](https://github.com/go-gitea/gitea/blob/19af5344623ba999f418520fad1a3bde77980561/Makefile#L797), they are passed by using `go build`'s -ldflags option).
Author
Owner

@GiteaBot commented on GitHub (Oct 5, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Oct 5, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13454