mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-05-08 20:58:16 -05:00
[GH-ISSUE #214] Forks overwriting original repos #1713
Reference in New Issue
Block a user
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?
Originally created by @m8tec on GitHub (Mar 6, 2026).
Original GitHub issue: https://github.com/RayLabsHQ/gitea-mirror/issues/214
Originally assigned to: @arunavo4 on GitHub.
It seems the tool tries to be a bit too smart when handling forks. If it mirrors a fork, it looks at the original creator (the parent) and saves the fork under the parent's namespace in Gitea, instead of the person who actually owns the fork.
Here is what happened to me:
Possible fixes:
It looks like the code is accidentally grabbing the source or parent owner from the GitHub API, instead of just using the direct owner.login of the current repo.
Also: shouldn't "Duplicate name handling" prevent this?
@arunavo4 commented on GitHub (Mar 6, 2026):
@m8tec I think the issue happened casue you had access to both the forks. Did not think about this before. Let me look into it. Thanks for reporting.
@arunavo4 commented on GitHub (Mar 6, 2026):
@m8tec in #215 now
preservemode forks from other users now stay in that user’s namespace (instead of falling into your default owner and risking overwrite).and reagrding duplicate handling, that setting is for name collisions, not owner-namespace routing.
v3.12.4: https://github.com/RayLabsHQ/gitea-mirror/releases/tag/v3.12.4
@m8tec commented on GitHub (Mar 6, 2026):
Awesome, it works! Thanks for the incredibly fast fix. Really appreciate the support and the great tool!
@arunavo4 commented on GitHub (Mar 6, 2026):
Perfect! Thank you for helping test and find the issue.