Incomplete repository path when creating pull mirror via "Migrate External Repository" #15039

Open
opened 2025-11-02 11:28:44 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @alex-16rd on GitHub (Oct 20, 2025).

Description

Gitea Version

1.24.6 (Docker image: gitea/gitea:1.24.6)

Problem Description

When attempting to create a pull mirror of an external repository with a deep path structure using the "Migrate External Repository" feature, the resulting repository URL in Gitea gets truncated and doesn't preserve the full original path structure.

Steps to Reproduce

  1. Go to Gitea and click "Create..." → "Migrate External Repository"
  2. Enter the original repository URL: https://git.example.com/caf/platform/prebuilts/python/darwin-x86/2.7.0.git
  3. Check "This repository will be a mirror" option
  4. Complete the migration process

Expected Behavior

The mirrored repository should maintain the complete path structure from the original URL:
https://git.anotherexample.com/caf/platform/prebuilts/python/darwin-x86/2.7.0.git

Actual Behavior

The resulting repository path is truncated to:
https://git.anotherexample.com/caf/2.7.0.git

The intermediate path components (platform/prebuilts/python/darwin-x86/) are lost.

What I've Tried

  1. Manual path creation: Attempted to create the full organizational structure manually before migration, but the migration feature doesn't seem to respect or utilize pre-existing nested organizational paths properly.

  2. Multiple migration attempts: Tried with different repository URLs with deep paths, all showing the same truncation behavior.

  3. Verified repository doesn't exist: Confirmed that no repository with the target path exists before migration.

Additional Context

  • This issue affects our workflow as we need to maintain identical path structures between our original and mirrored repositories for compatibility with existing build systems and developer tooling.
  • The truncation appears to keep only the first and last path components, discarding all intermediate directories.
  • We're running Gitea in Docker, but this appears to be a functional/logic issue rather than environment-specific.

Question

Is there a configuration option or alternative method to preserve the complete path structure when creating pull mirrors? If this is a bug, any guidance on potential fixes would be appreciated.

Thank you for your assistance!

Gitea Version

1.24.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

via Docker, LiteSQL, x86_64

Database

None

Originally created by @alex-16rd on GitHub (Oct 20, 2025). ### Description ### Gitea Version 1.24.6 (Docker image: `gitea/gitea:1.24.6`) ### Problem Description When attempting to create a pull mirror of an external repository with a deep path structure using the "Migrate External Repository" feature, the resulting repository URL in Gitea gets truncated and doesn't preserve the full original path structure. ### Steps to Reproduce 1. Go to Gitea and click "Create..." → "Migrate External Repository" 2. Enter the original repository URL: `https://git.example.com/caf/platform/prebuilts/python/darwin-x86/2.7.0.git` 3. Check "This repository will be a mirror" option 4. Complete the migration process ### Expected Behavior The mirrored repository should maintain the complete path structure from the original URL: `https://git.anotherexample.com/caf/platform/prebuilts/python/darwin-x86/2.7.0.git` ### Actual Behavior The resulting repository path is truncated to: `https://git.anotherexample.com/caf/2.7.0.git` The intermediate path components (`platform/prebuilts/python/darwin-x86/`) are lost. ### What I've Tried 1. **Manual path creation**: Attempted to create the full organizational structure manually before migration, but the migration feature doesn't seem to respect or utilize pre-existing nested organizational paths properly. 2. **Multiple migration attempts**: Tried with different repository URLs with deep paths, all showing the same truncation behavior. 3. **Verified repository doesn't exist**: Confirmed that no repository with the target path exists before migration. ### Additional Context - This issue affects our workflow as we need to maintain identical path structures between our original and mirrored repositories for compatibility with existing build systems and developer tooling. - The truncation appears to keep only the first and last path components, discarding all intermediate directories. - We're running Gitea in Docker, but this appears to be a functional/logic issue rather than environment-specific. ### Question Is there a configuration option or alternative method to preserve the complete path structure when creating pull mirrors? If this is a bug, any guidance on potential fixes would be appreciated. Thank you for your assistance! ### Gitea Version 1.24.6 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? via Docker, LiteSQL, x86_64 ### Database None
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 11:28:44 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Oct 20, 2025):

If I understand correctly, you mean this Subgroups in Gitea #1872 ?

Like GitHub, at the moment, Gitea doesn't support sub-groups.

@wxiaoguang commented on GitHub (Oct 20, 2025): If I understand correctly, you mean this Subgroups in Gitea #1872 ? Like GitHub, at the moment, Gitea doesn't support sub-groups.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15039