Files
gitea/templates/repo
Lunny Xiaoandwxiaoguang f10f7e7f91 fix(migrations): only allow local paths for plain git migration (#40006)
Only the plain git migration can clone from a local server path. Other
services (Gitea, GitLab, Gogs, OneDev, GitBucket, Codebase, CodeCommit,
Bitbucket Server) are accessed through their remote API, so a local path
never works, yet their migrate forms advertised "or a local server
path".

- Remove the local path hint from those templates.
- Add `IsMigrateURLAllowedForService` and use it in the web and API
migrate handlers and in `MigrateRepository`, rejecting local paths for
any service other than plain git.
- Add a unit test.

Raised in review of #39913.

_Authored with Codet (AI assistant) on behalf of @lunny._

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-10-25 21:21:19 +00:00
..
2026-06-08 17:16:22 +00:00
2024-03-14 23:24:59 +00:00
2023-04-29 15:43:01 -04:00