mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 00:02:43 +02:00
mirror fix of #1105
This commit is contained in:
1 parent
ab896ecf25
commit
5169a0e025
4 files changed
+11
-5
No files matched your search
@@ -196,9 +196,11 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) {
|
||||
}
|
||||
}
|
||||
|
||||
// Remote address can be HTTP/HTTPS URL or local path.
|
||||
// Remote address can be HTTP/HTTPS/Git URL or local path.
|
||||
remoteAddr := form.CloneAddr
|
||||
if strings.HasPrefix(form.CloneAddr, "http") {
|
||||
if strings.HasPrefix(form.CloneAddr, "http://") ||
|
||||
strings.HasPrefix(form.CloneAddr, "https://") ||
|
||||
strings.HasPrefix(form.CloneAddr, "git://") {
|
||||
u, err := url.Parse(form.CloneAddr)
|
||||
if err != nil {
|
||||
ctx.HandleAPI(422, err)
|
||||
|
||||
Reference in new issue
Block a user