@ -22,6 +22,7 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/log"
base "code.gitea.io/gitea/modules/migration"
base "code.gitea.io/gitea/modules/migration"
"code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/modules/structs"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v2"
@ -149,9 +150,10 @@ func (g *RepositoryDumper) CreateRepo(repo *base.Repository, opts base.MigrateOp
}
}
err = git . Clone ( g . ctx , remoteAddr , repoPath , git . CloneRepoOptions {
err = git . Clone ( g . ctx , remoteAddr , repoPath , git . CloneRepoOptions {
Mirror : true ,
Mirror : true ,
Quiet : true ,
Quiet : true ,
Timeout : migrateTimeout ,
Timeout : migrateTimeout ,
SkipTLSVerify : setting . Migrations . SkipTLSVerify ,
} )
} )
if err != nil {
if err != nil {
return fmt . Errorf ( "Clone: %v" , err )
return fmt . Errorf ( "Clone: %v" , err )
@ -166,10 +168,11 @@ func (g *RepositoryDumper) CreateRepo(repo *base.Repository, opts base.MigrateOp
}
}
if err := git . Clone ( g . ctx , wikiRemotePath , wikiPath , git . CloneRepoOptions {
if err := git . Clone ( g . ctx , wikiRemotePath , wikiPath , git . CloneRepoOptions {
Mirror : true ,
Mirror : true ,
Quiet : true ,
Quiet : true ,
Timeout : migrateTimeout ,
Timeout : migrateTimeout ,
Branch : "master" ,
Branch : "master" ,
SkipTLSVerify : setting . Migrations . SkipTLSVerify ,
} ) ; err != nil {
} ) ; err != nil {
log . Warn ( "Clone wiki: %v" , err )
log . Warn ( "Clone wiki: %v" , err )
if err := os . RemoveAll ( wikiPath ) ; err != nil {
if err := os . RemoveAll ( wikiPath ) ; err != nil {