-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Description
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
- Go to Gitea and click "Create..." → "Migrate External Repository"
- Enter the original repository URL:
https://git.example.com/caf/platform/prebuilts/python/darwin-x86/2.7.0.git
- Check "This repository will be a mirror" option
- 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 compon
62B4
ents (platform/prebuilts/python/darwin-x86/
) are lost.
What I've Tried
-
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.
-
Multiple migration attempts: Tried with different repository URLs with deep paths, all showing the same truncation behavior.
-
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