diff --git a/models/task.go b/models/task.go index cb878d387..763644e03 100644 --- a/models/task.go +++ b/models/task.go @@ -196,7 +196,7 @@ func CreateMigrateTask(doer, u *User, opts base.MigrateOptions) (*Task, error) { repo, err := CreateRepository(doer, u, CreateRepoOptions{ Name: opts.RepoName, Description: opts.Description, - OriginalURL: opts.CloneAddr, + OriginalURL: opts.OriginalURL, IsPrivate: opts.Private, IsMirror: opts.Mirror, Status: RepositoryBeingMigrated, diff --git a/routers/repo/repo.go b/routers/repo/repo.go index bfd0c771b..dd401a20a 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -291,6 +291,7 @@ func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { } var opts = migrations.MigrateOptions{ + OriginalURL: form.CloneAddr, CloneAddr: remoteAddr, RepoName: form.RepoName, Description: form.Description,