From f42cd4561b6ef622b029deedecb2f3e29828a7cb Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 11 Aug 2023 06:42:48 +0800 Subject: [PATCH] Call git.InitSimple for runRepoSyncReleases (#26396) Fix #26394 Otherwise, the git module is not initialized and it doesn't respect the "timeout" config in app.ini --- cmd/admin.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/admin.go b/cmd/admin.go index 745427ca24..a4f48b0513 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -355,6 +355,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{