Skip to content

Commit d6cf261

Browse files
GiteaBotwxiaoguang
andauthored
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 <[email protected]>
1 parent 7c555b2 commit d6cf261

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/admin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ func runRepoSyncReleases(_ *cli.Context) error {
348348
return err
349349
}
350350

351+
if err := git.InitSimple(ctx); err != nil {
352+
return err
353+
}
354+
351355
log.Trace("Synchronizing repository releases (this may take a while)")
352356
for page := 1; ; page++ {
353357
repos, count, err := repo_model.SearchRepositoryByName(ctx, &repo_model.SearchRepoOptions{

0 commit comments

Comments
 (0)