From d6cf261be860e8022ccbad5585fc3508e840d409 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 11 Aug 2023 07:16:12 +0800 Subject: [PATCH] Call git.InitSimple for runRepoSyncReleases (#26396) (#26450) Backport #26396 by @wxiaoguang Fix #26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini Co-authored-by: wxiaoguang --- cmd/admin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/admin.go b/cmd/admin.go index f9fb1b6c68f..160cb5c00ff 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -348,6 +348,10 @@ func runRepoSyncReleases(_ *cli.Context) error { return err } + if err := git.InitSimple(ctx); err != nil { + return err + } + log.Trace("Synchronizing repository releases (this may take a while)") for page := 1; ; page++ { repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{