diff --git a/routers/web/repo/annex.go b/routers/web/repo/annex.go index 852b5a11cc..d696a35100 100644 --- a/routers/web/repo/annex.go +++ b/routers/web/repo/annex.go @@ -19,6 +19,7 @@ import ( "code.gitea.io/gitea/modules/annex" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" services_context "code.gitea.io/gitea/services/context" ) @@ -93,6 +94,10 @@ func AnnexP2PHTTP(ctx *services_context.Context) { Pdeathsig: syscall.SIGINT, } cmd.Cancel = func() error { return cmd.Process.Signal(os.Interrupt) } + cmd.Env = append(os.Environ(), + "GIT_AUTHOR_NAME="+setting.AppName, + "GIT_AUTHOR_EMAIL="+setting.RunUser+"@"+setting.Domain, + ) _ = cmd.Run() }(p2phttpCtx) graceful.GetManager().RunAtTerminate(p2phttpCtxCancel)